开发者

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

My SQL Server 2008 server database for one of my new projects has deleted accidentally. What I'm left with is LINQ to SQL sche开发者_如何转开发ma file (DataContext schema and classes) and with hope to get my database structure back from this.

Is there a way?


For simple schema you can just call dataContext.CreateDatabase() - however it would be ambitious to hope for this to handle everything. I suspect you may have to accept the loss and (sadly) learn about the value of backups.

See MSDN for more on CreateDatabase:

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


DataContext.CreateDatabase

Watch out for missing indexes, lookup data, etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜