dexter
dexter

Reputation: 7203

What is the need for "Disconnected Updates" in LINQ To SQL?

When and why would one use this approach?

It seems to be very tricky and there is not easy way to update a disconnected datacontext.

So why would such a need ever exist in the development process?

Upvotes: 1

Views: 76

Answers (1)

Randy Minder
Randy Minder

Reputation: 48432

First of all, it's not that tricky. The company I work for is a $2.5B solar manufacturing company, and we use L2S as the foundation of all our manufacturing applications. We use disconnected updates for most of our updates, with great success.

Why would there be a need? How about in situations where you have a client, middle tier and backend database. The client talks to the middle tier via WCF (like we do) or webservices. We pass entities from the client to the middle tier for updating (or inserting) to the database. In this scenario, which is VERY common, all your updates will be disconnected. The reason, of course, is because the entities are being passed via WCF and there is, obviously, no stateful connection to the database in this scenario. This is probably how a majority of applications are written today.

It can be done, and it's not that tricky or hard.

Upvotes: 2

Related Questions