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

Dynamic LINQ

May 10, 2008 at 10:36 am (LINQ)

Good blog post the describes using dynamic LINQ to create lambda expressions to use in LINQ.

Permalink Leave a Comment

Improve LINQ to SQL performance

May 5, 2008 at 12:21 pm (LINQ, SQL)

While it is easy to get carried away with using LINQ to SQL, developers have the responsibility to understand what is going on under the hood and to ensure that things are running as smoothly and efficiently as possible.

The following blog post describes 10 tips from improving LINQ to SQL performance, highly recommended for anyone using LINQ to SQL.

Permalink 1 Comment

LINQ Links

January 16, 2008 at 3:06 am (LINQ)

I recently came across a fairly good set of links all related to LINQ:

http://blogs.msdn.com/charlie/archive/2006/10/05/Links-to-LINQ.aspx

Permalink Leave a Comment

Entity Framework FAQ

January 16, 2008 at 2:32 am (LINQ, Microsoft, SQL)

With LINQ become more predominate every day, eventually some important will be asked as developers need to adopt new and different ways of accessing data repositories.

I recently came across a great (and detailed) FAQ that is sure to answer most questions.

http://blogs.msdn.com/dsimmons/pages/entity-framework-faq.aspx

I certainly answered my question, but not with the answer I was hoping for :(. Automatic mapping between Enums and a column in a table is not supported.

http://blogs.msdn.com/dsimmons/pages/entity-framework-faq.aspx#_Does_the_EDM/EF

I hope they rethink this as that kind of simplicity is what increases adoption of new technologies. It’s  one the things that convinced me to start using NHibernate. Even LINQ to SQL supports automatic enum mapping.

Permalink Leave a Comment