DCSIMG
LINQ To SQL Vs. Entity Framework - Gil Fink's Blog

Gil Fink's Blog

Fink about IT

News

Microsoft MVP

My Facebook Profile My Twitter Profile My Linkedin Profile

Locations of visitors to this page

Creative Commons License

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2013 Gil Fink

Hebrew Articles

Index Pages

My OSS Projects

English Articles

LINQ To SQL Vs. Entity Framework

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
Model

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.

Comments

Sergei Gorlovetsky said:

Hi Gil,

Greate post. Exactly what I was looking for.

Where u presenting this lecture and when?

Thanks,

Serge.

# May 1, 2008 10:49 AM

Gil Fink said:

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.

# May 1, 2008 11:39 AM

Shlomi Shema said:

What about performance?

# June 5, 2008 3:16 PM

Gil Fink said:

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.

# June 5, 2008 10:12 PM

ddpatil said:

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.

# February 27, 2009 11:21 AM

Gil Fink said:

@ddpatil,

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.

# February 27, 2009 12:38 PM

ddpatil said:

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.

Thanks.

# February 27, 2009 3:17 PM

Gil Fink said:

@ddpatil,

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.

# February 28, 2009 12:12 PM

ASP.NET MVC Vs ASP.NET Webform « Mohan.k said:

Pingback from  ASP.NET MVC Vs ASP.NET Webform « Mohan.k

# September 30, 2011 6:26 AM