In an Asp.net project I need to have a sandbox environment so that user be able to test the processes without any risk to hurt the database, so I want to make a stored procedure to create a sort of database clone in which some tables come with data and some come without any data, I think it should be a stored procedure which takes the table name as an argument and another Boolean argument which determines if it's supposed to make a clone of table with data or just the table structure, It will be so better if it considers Views too.
I have read some articles and some Q&A in this website like this one that creates a database backup and then restores it by another name as a clone database, I even read about DBCC in here but none of them have offered such a customized script I tend to have.
Thanks in advance.