Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 365
user649802 Avatar asked Mar 18 '11 13:03

user649802


People also ask

What contains .edmx file?

An . edmx file is an XML file that defines an Entity Data Model (EDM), describes the target database schema, and defines the mapping between the EDM and the database. An . edmx file also contains information that is used by the ADO.NET Entity Data Model Designer (Entity Designer) to render a model graphically.

What is the difference between Entity Framework and LINQ?

Entity Framework is an object-relational mapping (ORM) framework for connecting C# code to external databases, usually SQL Server. LINQ is a query language embedded into C# and a set of extension methods in order to make it useful.

What is a Dbml file?

DBML files are used by the Visual Studio Code Generator to auto-generate Visual Basic, C#, or XML source code files. This allows developers to manipulate database records directly as native classes within the application. NOTE: DBML files are stored in an XML format and must conform to the published DBML .


2 Answers

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.

like image 163
Mikael Östberg Avatar answered Oct 01 '22 13:10

Mikael Östberg


.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.

like image 39
vcsjones Avatar answered Oct 01 '22 13:10

vcsjones