What is difference between .edmx and .dbml file in linq?
What is difference between .edmx and .dbml file in linq?In VS 2008 which datasource is best choice where edmx or dbml?Any problem will arise using edmx file in VS 2008?Can i use edmx in VS-2008?
Solution 1:
edmx is the modeling file for Entity Framework.
dbml is the modeling file for Linq 2 Sql.
You should spend your time learning Entity Framework as Linq 2 Sql is deprecated.
Solution 2:
.edmx
is the Entity Framework. .dbml
is LINQ-to-SQL. While their general purpose is the same, they are entirely different frameworks. Entity Framework is newer and will probably be the best investment of your time to learn since I suspect that is where a lot of innovation is going to go.
Solution 3:
Both are introduced as latest technologies and at times a bit confusing when to use which. Entity Framework and LINQ to SQL have a lot in common but still different from each other in quite a few ways:
Entity Framework:
1. Enterprise Development:
2. Works with Conceptual model of database:
3. Works with all data sources:
4. ".EDMX" is created while using Entity Framework:
LINQ::
1. Rapid Application Development:
2. Works with objects in database:
3. Mainly woks with SQL Server:
4. ".dbml" is created while using LINQ to SQL:
:
Entity Framework is more targeted towards Enterprise Development where the schema is usually optimized for storage considerations like performance consistency and partitioning. Entity Framework is designed around exposing an application-oriented data model that is loosely coupled and may differ from the existing database schema. For example, you can map a single entity (class) to multiple or map multiple entities to the same table. Entity Framework has “.edmx” (ADO.NET Entity Model) file when added in the application.
LINQ to SQL mainly has features to support Rapid Application Development against SQL Server. LINQ to SQL allows you to have a strongly typed view of your existing database schema. You can build LINQ queries over tables and return results as strong typed objects. LINQ to SQL has “.dbml”(LINQ to SQL) file when added in the application. You can use LINQ to SQL by decorating the existing classes with the attributes.
[Original source: https://parassanghani.blogspot.com/2011/01/entity-framework-vs-linq-to-sql.html]
Solution 4:
LINQ to SQL mainly has features to support Rapid Application Development against SQL Server. LINQ to SQL allows you to have a strongly typed view of your existing database schema. You can build LINQ queries over tables and return results as strong typed objects. LINQ to SQL has “.dbml”(LINQ to SQL) file when added in the application. You can use LINQ to SQL by decorating the existing classes with the attributes.