views:

69

answers:

1

Does LINQ to SQL work in connected environment or disconnected environment? I mean if you compile the query it builds expression query and the query is sent down to sql server ,there it is translated into T-SQL statement and executed and the final result is sent back to the C# code.I hope it is working in connected environment.Is there any framework operates LINQ to SQL in disconnected fashion?

+2  A: 

It is connected when it needs to be - i.e. when querying data and when submit changes. If you supply a connection (to the overloaded constructor) that connection will be re-used, otherwise IIRC connection-pooling is used.

For fully disconnected, there are things like "sync services", which builds a local copy of the data.

Marc Gravell
Hi Marc, What is IRRC ?
IIRC = If I recall correctly (I think).
shahkalpesh
@Marc can you elaborate a bit about sync services,Is it framework ?
In Codeplex something called "LINQ to SQL Entity Base - Disconnected LINQ",it suggests it works completed in disconnected fashion.So ,i wanted to know the difference.
@netguy http://msdn.microsoft.com/en-us/sync/default.aspx ; also Entity Base sounds like Entity Framework, not LINQ-to-SQL - they are separate products.
Marc Gravell