Kirk Evans Blog

.NET From a Markup Perspective

LINQ to SQL vs. LINQ to Entities Smackdown!

LINQ to SQL vs. LINQ to Entities Smackdown!

  • Comments 1

OK, maybe not a smackdown... but it sure sounded like a good title.

There's a great paper on MSDN that describes the similarities and differences in LINQ to SQL and LINQ to Entities from the Entity Framework. 

I have done a bunch of LINQ demos recently, a lot of people are really fired up about the simplicity that LINQ brings to the table.  What is confusing is how LINQ to SQL conflicts and overlaps with what LINQ to Entities offers.  From the article referenced above, the key takeaways are summarized below. 

LINQ to SQL is good when your solution is targeted classes are going to be targeted at SQL Server and you have a 1:1 relationship between the domain model and database schema.

Use LINQ to Entities as an ORM solution where your classes may be 1:1 with the database or may have a very different structure from the database schema and targets.  LINQ to Entities will also good for 3rd party database solutions. 

 

Page 1 of 1 (1 items)
Leave a Comment
  • Please add 8 and 5 and type the answer here:
  • Post
Translate This Page
Search
Archive
Archives