S.No | LINQ To SQL | Entity Framework |
1. | LINQ to SQL only works with SQL Server. | It works with various RDBMS like Oracle, MySQL, SQL Server, DB2 |
2 | LINQ to SQL cannot generate the database based on model classes. | Entity Framework generates the database based on model classes |
3 | LINQ to SQL uses the Data Context class to interact with a database. | Entity Framework generates the DBContext class to interact with the database. |
4 | LINQ to SQL is tightly coupled. | Entity Framework is Loosely Coupled |
5 | It 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 |
6 | It does not support the complex type. | It supports the complex type |
7 | It will generate the DBML file (Database Mark up Language) and the file with 3 sections to represents the schema: csdl, msl,ssdl | It generates the .EDMX file (Entity Data Model Extension) |
8 | Very slow for the first query | Very slow for the first query. But overall performance is better than LINQ TO SQL |
9 | Rapid Development | Development time is slower than LINQ to SQL but it provides more capabilities |
10 | LINQ TO SQL works based on ORM Pattern | Entity Framework also works based on ORM Pattern |