user274364
user274364

Reputation: 1857

LINQ to SQL -Internals -C#

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?

Upvotes: 1

Views: 312

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1064114

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.

Upvotes: 2

Related Questions