Tuesday, September 28, 2010

Edmx vs Dbml

Entity framework (EF)
LINQ to SQL (L2S)

Edmx vs Dbml
--------------------
Shouldn't be any difference since they both generate classes that you would expose to the client via RIA services.

RIA - Rich Internet Applications

---------------------------------------------------------------------------------
Category...............LINQ to SQL.............Entity Framework
---------------------------------------------------------------------------------
1.Model................domain model............conceptual data model

2.Databases Supported..as the name indicates:..only variety of databases
SQL server

3.Data Sources.........tables only.............tables, replication, reporting Services,BI and etc

4.Complexity...........simple to use...........complex to use

5.Development Time.....rapid development.......slower development but more capabilities

6.Mapping..............class to single table...class to multiple tables

7.Inheritance..........hard to apply...........simple to apply

8.File Types...........dbml files only.........edmx files after compilation generate 3 xml files to represent the schema: csdl, msl and ssdl
----------------------------------------------------------------------------------------------------
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.

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.



There is a big difference between LINQ to SQL and LINQ.
--------------------------------------------------------
LINQ is Language Integrated Query

DataSet : LINQ to DataSet
XML: LINQ to XML
In Memory Objects: LINQ to Objects
ADO.NET Data Services (Astoria) Client: LINQ to Data Services
LINQ to Relational Databases:
LINQ to SQL –
Entity Framework (LINQ to Entities)
There are many other people in the company and broader community working on LINQ solutions to other data sources. We are also excited to see LINQ being applied to many cool new problems beyond the typical data access scenario.

1 comment: