Transfering databases between servers or creating a copy of db within the server's instance is easy enough. We can use Microsoft.SqlServer.Management.Smo.Transfer class.
But what if I need to read all the structure of db, save it somewhere on the disk and then sometime later use that data to create a database according to the data previously saved.
Should I use Transfer again? Or there's something better and more useful than that?
Could you show me an example. Thank you.