Update Detached Entities

September 29, 2008 at 3:00 pm (.NET, LINQ, SQL)

Probably one of the most asked questions with LINQ to SQL, is how do you update detached entities. Often people will simply resort to doing a SELECT to get the entity into the datacontext and then update the data.

Steve Michelotti describes how to do it here:

http://geekswithblogs.net/michelotti/archive/2007/12/17/117791.aspx

and if your entity has child objects check this post out:

http://geekswithblogs.net/michelotti/archive/2007/12/30/118076.aspx

Advertisements

Permalink Leave a Comment

Entity Framework Tutorial/Overview

September 10, 2008 at 4:06 pm (Entity Framework, LINQ)

For an excellent write up on Entity Framework that is both an overview and tutorial in one, see Stefan Cruysberghs 3 part series.

It covers enough that it’s not too much information, but detailed enough to get you going rapidly.

Permalink Leave a Comment

Optimistic Concurrency Updates with Entity Framework

September 10, 2008 at 4:01 pm (Entity Framework, LINQ)

Cesar de la Torre has an excellent write up for managing concurrency with the Entity Framework.

Permalink Leave a Comment