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?
linq中.edmx和.dbml文件有什么区别?在VS 2008中哪个数据源是edmx或dbml的最佳选择?在VS 2008中使用edmx文件会出现任何问题?我可以在VS-2008中使用edmx吗?
5 个解决方案
#1
42
edmx is the modeling file for Entity Framework.
edmx是Entity Framework的建模文件。
dbml is the modeling file for Linq 2 Sql.
dbml是Linq 2 Sql的建模文件。
You should spend your time learning Entity Framework as Linq 2 Sql is deprecated.
您应该花时间学习实体框架,因为不推荐使用Linq 2 Sql。
#2
35
.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.
.edmx是实体框架。 .dbml是LINQ-to-SQL。虽然它们的一般目的是相同的,但它们是完全不同的框架。实体框架是更新的,可能是您学习时间的最佳投资,因为我怀疑这是许多创新的目标。
#3
13
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:
两者都是作为最新技术引入的,有时在使用时会有点混乱。实体框架和LINQ to SQL有很多共同之处,但在很多方面仍然存在差异:
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:
实体框架:1。企业开发:2。使用数据库的概念模型:3。与所有数据源一起使用:4。使用实体框架时创建“.EDMX”:
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:
:
LINQ :: 1.快速应用程序开发:2。使用数据库中的对象:3。主要使用SQL Server:4。使用LINQ to SQL时创建“.dbml”:
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.
实体框架更倾向于企业开发,其中模式通常针对存储考虑因素(如性能一致性和分区)进行优化。实体框架是围绕暴露面向应用程序的数据模型而设计的,该数据模型松散耦合并且可能与现有数据库模式不同。例如,您可以将单个实体(类)映射到多个或将多个实体映射到同一个表。实体框架在应用程序中添加“.edmx”(ADO.NET实体模型)文件。
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.
LINQ to SQL主要具有支持针对SQL Server进行快速应用程序开发的功能。 LINQ to SQL允许您拥有现有数据库模式的强类型视图。您可以在表上构建LINQ查询并将结果作为强类型对象返回。 LINQ to SQL在应用程序中添加“.dbml”(LINQ to SQL)文件。您可以通过使用属性修饰现有类来使用LINQ to SQL。
#4
2
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.
LINQ to SQL主要具有支持针对SQL Server进行快速应用程序开发的功能。 LINQ to SQL允许您拥有现有数据库模式的强类型视图。您可以在表上构建LINQ查询并将结果作为强类型对象返回。 LINQ to SQL在应用程序中添加“.dbml”(LINQ to SQL)文件。您可以通过使用属性修饰现有类来使用LINQ to SQL。
#5
0
I never understood the literature like definitions. Anyways the bottom line is L2S is lightweight and EF is heavy weight. Meaning L2S works only with SQLServer and EF works with many more.
我从不理解文献中的定义。无论如何,底线是L2S轻量级,EF重量很重。含义L2S仅适用于SQLServer,EF可以使用更多。
Reference: Difference between L2S and EF
参考:L2S和EF之间的差异
#1
42
edmx is the modeling file for Entity Framework.
edmx是Entity Framework的建模文件。
dbml is the modeling file for Linq 2 Sql.
dbml是Linq 2 Sql的建模文件。
You should spend your time learning Entity Framework as Linq 2 Sql is deprecated.
您应该花时间学习实体框架,因为不推荐使用Linq 2 Sql。
#2
35
.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.
.edmx是实体框架。 .dbml是LINQ-to-SQL。虽然它们的一般目的是相同的,但它们是完全不同的框架。实体框架是更新的,可能是您学习时间的最佳投资,因为我怀疑这是许多创新的目标。
#3
13
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:
两者都是作为最新技术引入的,有时在使用时会有点混乱。实体框架和LINQ to SQL有很多共同之处,但在很多方面仍然存在差异:
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:
实体框架:1。企业开发:2。使用数据库的概念模型:3。与所有数据源一起使用:4。使用实体框架时创建“.EDMX”:
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:
:
LINQ :: 1.快速应用程序开发:2。使用数据库中的对象:3。主要使用SQL Server:4。使用LINQ to SQL时创建“.dbml”:
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.
实体框架更倾向于企业开发,其中模式通常针对存储考虑因素(如性能一致性和分区)进行优化。实体框架是围绕暴露面向应用程序的数据模型而设计的,该数据模型松散耦合并且可能与现有数据库模式不同。例如,您可以将单个实体(类)映射到多个或将多个实体映射到同一个表。实体框架在应用程序中添加“.edmx”(ADO.NET实体模型)文件。
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.
LINQ to SQL主要具有支持针对SQL Server进行快速应用程序开发的功能。 LINQ to SQL允许您拥有现有数据库模式的强类型视图。您可以在表上构建LINQ查询并将结果作为强类型对象返回。 LINQ to SQL在应用程序中添加“.dbml”(LINQ to SQL)文件。您可以通过使用属性修饰现有类来使用LINQ to SQL。
#4
2
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.
LINQ to SQL主要具有支持针对SQL Server进行快速应用程序开发的功能。 LINQ to SQL允许您拥有现有数据库模式的强类型视图。您可以在表上构建LINQ查询并将结果作为强类型对象返回。 LINQ to SQL在应用程序中添加“.dbml”(LINQ to SQL)文件。您可以通过使用属性修饰现有类来使用LINQ to SQL。
#5
0
I never understood the literature like definitions. Anyways the bottom line is L2S is lightweight and EF is heavy weight. Meaning L2S works only with SQLServer and EF works with many more.
我从不理解文献中的定义。无论如何,底线是L2S轻量级,EF重量很重。含义L2S仅适用于SQLServer,EF可以使用更多。
Reference: Difference between L2S and EF
参考:L2S和EF之间的差异