I have a working LINQ to SQL model. I want to be able to use the same model but with a connection to a DataSet object, instead of SQL Server.
I need to be able to query the model, modify fields, as well as do insert and delete operations. Is there an easy way to accomplish this?
I noticed another question mentions a similar scenario, but I’m not sure if this applies to my question.
You can use LINQ to DataSet directly but the LINQ to SQL query translator converts expression trees into SQL statements and that can’t be changed.
For lists of inserts/updates/deletes for a given DataContext, you can call
DataContext.GetChangeSet()