LINQ To SQL Vs. Entity Framework

April 20, 2008

LINQ To SQL Vs. Entity Framework

During the making of a new lecture, I made a comparison between LINQ
to SQL
and entity framework. Here are the things I wrote in the lecture:

Category LINQ to SQL Entity Framework

domain model

conceptual data model

Databases Supported as the name indicates: SQL server only

variety of databases

Data Sources

tables only

tables, replication, reporting Services, BI and etc

Complexity simple to use complex to use
Development Time rapid development slower development but more capabilities
Mapping class to single table class to multiple tables
Inheritance hard to apply simple to apply
File Types dbml files only edmx files
after compilation generate 3 xml files to represent the schema:
csdl, msl and ssdl

There are more differences between the frameworks but these are the
most important.
I hope the post will help you to decide which framework is more suitable
for your project.

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



  1. Sergei GorlovetskyMay 1, 2008 ב 10:49

    Hi Gil,
    Greate post. Exactly what I was looking for.
    Where u presenting this lecture and when?

  2. Gil FinkMay 1, 2008 ב 11:39

    I’m currently scheduled to present the lecture in SRL. It’s going to be next month. I’ll publish the slides in the blog after the lecture.

  3. Shlomi ShemaJune 5, 2008 ב 15:16

    What about performance?

  4. Gil FinkJune 5, 2008 ב 22:12

    Hi Shlomi,
    Currently LINQ to SQL has better performance. The ADO.NET team work on the performance issues of entity framework. They posted that when the framework will be released with SP1 of visual studio the performance issue will be better.

  5. ddpatilFebruary 27, 2009 ב 11:21

    As a datalayer, Which framework I need to use (LINQ to SQL or LINQ to Entity)?

    For future point of view which framework microsoft is recommending?

    Please let me know if you have any ideas.

  6. Gil FinkFebruary 27, 2009 ב 12:38

    When you want to build a data layer there are many choices (and EF and LINQ2SQL are among them). Microsoft recommend the use of EF because they are going to make LINQ2SQL legacy in the future.

  7. ddpatilFebruary 27, 2009 ב 15:17

    Thanks Gil,

    Right Now I am evaluating both the Linq to SQL (L2S) and Linq to Entity (L2E). but I strongly fill that I have to go with L2S as a data layer. Because as you mentioned L2S is fater and we can develop application rapidly.

    But Future point of view L2E is good, but
    Is this right time to use L2E?

    if I have created application using L2S and In future I wanted to move L2E
    There is possibility we will have converters *.dbml to *.edmx, but
    what about code which I have wrote?

    or Is there any similarities between Syntax of L2S and L2E.


  8. Gil FinkFebruary 28, 2009 ב 12:12

    Although there are problems with V1 of EF, I think that it’s the right time to learn the technology and to have more options to think about in order to implement a data access layer. I suggest to do a small POC (Proof Of Concept) and to check which technology is more appropriate for your appliation.
    About the second question, I don’t know if there will be converters from *.dbml to *.edmx in the future, but I can say that changing an application from using L2S to using L2E isn’t so trivial. There are a lot of differences between the two technologies.