简体   繁体   English

实体框架3.5或4.0?

[英]Entity Framework 3.5 or 4.0?

I'm starting a new project and the client wants to use the Entity Framework for their business layer. 我正在开始一个新项目,客户希望将Entity Framework用于他们的业务层。 They are currently using .NET Framework 3.5. 他们目前正在使用.NET Framework 3.5。 Would it be worth it to upgrade to 4.0 for the Entity Framework? 是否值得为实体框架升级到4.0? What are the significant changes between the two versions? 两个版本之间有什么重大变化?

Entity 4.0 supports POCO (Plain Old CLR Objects) , which is a big plus if you do model-first (as opposed to database-first) development such as Domain Driven Design . 实体4.0支持POCO(普通旧CLR对象) ,如果您先进行模型优先(而不是数据库优先)开发(如域驱动设计 ,这是一个很大的优势。

Here is an article that compares Entity 1.0 to 4.0. 是一篇将实体1.0与4.0进行比较的文章。 Regarding 4.0, it states (and discuses) the following new features: 关于4.0,它陈述(并讨论)以下新功能:

  1. Persistence Ignorance 坚持无知
  2. POCO (Plain Old CLR Object) POCO(普通旧CLR对象)
  3. T4 Code Generation T4代码生成
  4. Self-Tracking Entities 自我追踪实体
  5. Model-First Development 模型优先发展
  6. FK Associations FK协会
  7. Code-only 代码只

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM