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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: