LINQ之间的区别SQL和实体框架实体、框架、区别、LINQ

2023-09-03 23:00:08 作者:痛定思痛。

有LINQ的差异,以SQL和实体框架,比如LINQ到SQL的LOF是一对一的映射和EF是多对多的映射和许多其他可以在这里找到 http://stackoverflow.com/questions/8676/entity-framework-vs-linq-to-sql

There are lof of difference between Linq to Sql and Entity framework like Linq to SQL is one to one mapping and EF is many to many mapping and many other which can be found at http://stackoverflow.com/questions/8676/entity-framework-vs-linq-to-sql

但在这里,我问有EF和LINQ to SQL中,做我们创建实体,然后再生成表格或其他方式,什么是阳性,这两个方法的负面影响。 在EF莫不是这是遗传的多个表,并且不重新present任何东西在数据库中的任何经营实体。 是LINQ到实体从EF不同?

But here I am asking with EF and Linq to Sql, do we create Entities first and then generate tables or the other way and what are positives and negatives of both the approaches. In EF could there be any business entities which are inherited form multiple tables and does not represent any thing in the DB. Is Linq to Entities different from EF?

请让我知道如果问题不明确或错误地问道。在此先感谢球员。

Please let me know if question is not clear or wrongly asked. Thanks in advance guys.

推荐答案

有关产的版本,这两个EF和放大器; L2S需要一个数据模型(读:数据库模式)要到位,可产生的任何类之前。从该先创建类,然后生成数据库的能力是可以在EF4 CTP的是 ScottGu博客有关最近。

For "production" releases, both EF & L2S require that a data model (read: Database schema) be in place before any classes can be generated. The ability to create your classes first and then generate the DB from that is available in the form of the EF4 CTP that ScottGu blogged about recently.

据一个单一的实体反映多个表:我认为,目前是一个一对一的关系:1。表= 1实体

As far as a single Entity reflecting multiple tables: I believe that is currently a one-to-one relationship: 1 table = 1 Entity.