开发者

LINQ to SQL Backup Script

开发者 https://www.devze.com 2023-02-14 18:49 出处:网络
I have been asked to generate a开发者_如何学C Backup Script. Which comprises of a lot of insert statements.

I have been asked to generate a开发者_如何学C Backup Script. Which comprises of a lot of insert statements.

However im not sure how to go about this with SQL to Linq, I have looked at the DataContext Mapping which is able to list all the tables. However I need to be able to then go through each row and grab the data, which will be wrote into the Backup Script.

Any advice would be appreciated.

Thank you


Is it really a requirement to use Linq2SQL. Otherwise I guess the following stored procedure will do?

This procedure generates INSERT statements using existing data from the given tables and views. Later, you can use these INSERT statements to generate the data. It's very useful when you have to ship or package a database application. This procedure also comes in handy when you have to send sample data to your vendor or technical support provider for troubleshooting purposes.

http://vyaskn.tripod.com/code.htm#inserts

0

精彩评论

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