I lost the SQL Server 2008 database, I need the database structure from the LINQ schema

My SQL Server 2008 database for one of my new projects accidentally deleted. I stayed with the LINQ to SQL schema file (DataContext schemas and classes) and hoping to restore my database structure.

Is there any way?

+3
source share
2 answers

For a simple schema, you can simply call dataContext.CreateDatabase () - however it would be ambitious to hope that all of this will handle. I suspect that you may have to accept the loss and (unfortunately) find out about the value of backups.

For more information about CreateDatabase, see MSDN:

http://msdn.microsoft.com/en-us/library/system.data.linq.datacontext.createdatabase.aspx

+7
+1

Source: https://habr.com/ru/post/1779641/


All Articles