Header Ads

Entity Framework(EF) VS LINQ to SQL

Difference between Entity Framework and LinQ to SQL:
Entity Framework(EF) VS LINQ to SQL

Entity FrameworkLinQ to SQL
It allows one-to-one, one-to-many & many-to-many mappings between the Entity classes and the relational tables /viewsIt allows only one to one mapping between the entity classes and the relational tables /views.
It can works with various databases like Oracle, DB2, MYSQL, SQL Server etc.It only works with SQL Server Database.
It generates an .edmx files initially. The relation is maintained using 3 different files .csdl, .msl and .ssdlIt generates a .dbml to maintain the relation
It has support for complex type.It has not support for complex type.
It can generate database from model.It cannot generate database from model.
It can be used for rapid application development with RDBMS like SQL Server, Oracle, DB2 and MySQL etc.It can be used for rapid application development only with SQL Server.
It provides a loosely coupled approach. Since its code first approach allow you to use Dependency Injection pattern which make it loosely coupled .It provides a tightly coupled approach.
It allows you to query data using EntitySQL, ObjectContext, DbContext.It allows you to query data using DataContext.

No comments:


Powered by Blogger.