Reputation: 6120
I Have database. I get my data from database with LINQ and save in DATATABLES. After I updated my DataTables.And now i want to save my datatables back to my database.But i want to use .How can I apply LINQ to DataTable save it back to database?
Thank you
Upvotes: 1
Views: 368
Reputation: 5567
You shouldn't need to use DataTables on top of Linq2Sql, it already gives you strongly typed objects. You make the updates you want against your Linq2Sql model, then call SubmitChanges()
on your Linq2Sql context.
Upvotes: 1
Reputation: 292435
Linq isn't always the right tool for the job... in that case, you should use a DbDataAdapter
Upvotes: 2