tags:

views:

277

answers:

2

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.

+1  A: 

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()

Mark Cidade
A: 

You want a DataContext that is backed by a DataSet. No, this does not exist unless you build it.

David B