Difference Between LINQ To SQL And Entity Framework

S.NoLINQ To SQLEntity Framework
1.LINQ to SQL only works with SQL Server.It works with various RDBMS like Oracle, MySQL, SQL Server, DB2
2LINQ to SQL cannot generate the database based on model classes.Entity Framework generates the database based on model classes
3LINQ to SQL uses the Data Context class to interact with a database.Entity Framework generates the DBContext class to interact with the database.
4LINQ to SQL is tightly coupled.Entity Framework is Loosely Coupled
5It supports only 1-1 relation while mapping the relational tables with classes.It supports the 1-1, 1-*, *-1, *-* relation while mapping relation tables with classes
6It does not support the complex type.It supports the complex type
7It will generate the DBML file (Database Mark up Language) and the file with 3 sections to represents the schema: csdl, msl,ssdlIt generates the .EDMX file (Entity Data Model Extension)
8Very slow for the first queryVery slow for the first query. But overall performance is better than LINQ TO SQL
9Rapid DevelopmentDevelopment time is slower than LINQ to SQL but it provides more capabilities
10LINQ TO SQL works based on ORM PatternEntity Framework also works based on ORM Pattern
Ebook Download
View all
Learn
View all