本文介绍了是否有技术原因EF 5不完全支持.NET4.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我的应用程序升级到EF 5利用功能,比如可枚举空间等,但支持,我不能,除非我移动到.NET 4.5的升级。

I wanted to upgrade my app to EF 5 to take advantage of features like support for enum spatial etc. However, I was not able to upgrade unless I move to .Net 4.5.

我想知道的.Net 4.5的哪些功能EF 5使用的,它不能在.NET 4.0中做了什么?

I would like to know what features of .Net 4.5 does EF 5 use that it can not be done in .Net 4.0?

推荐答案

我的理解是,EF> = 4.1(包括EF 5)由

My understanding is that EF >= 4.1 (including EF 5) consists of

  • 的EF核心库之类的( System.Data.Entity.dll ),这是.NET Framework的一部分
  • 的附加包​​/组件,您可以通过下载的NuGet包含的DbContext API和code-首先发展
  • the EF "core libraries" like (System.Data.Entity.dll) which are part of the .NET Framework
  • the additional package/assembly you can download via Nuget which contains the DbContext API and Code-First development

有计划,并在2011年夏天的一个尝试(在Entity框架2011年6月CTP )释放枚举,空间支持等新功能(除了code-首先迁移)为核心librares的更新之前,.NET 4.5发布。但EF团队已经决定,这样的出带外更新是可能的的NuGet包(这就是为什么EF 4.3已经具备,并不需要接触到核心库的迁移功能),但核心库他们太困难的,可以.NET 4.5发布之前无法做到的:

There were plans and an attempt in summer 2011 (the Entity Framework June 2011 CTP) to release the enum, spatial support and other new features (except Code-First Migrations) as an update of the core librares before .NET 4.5 is released. But the EF team has decided that such out-of-band updates are possible for the NuGet package (that's why EF 4.3 already has the Migrations feature that didn't require to touch the core libraries), but for the core libraries they are too difficult and can't be done before .NET 4.5 release:

有两个逻辑部分的实体框架中,芯  附带.NET Framework和Visual Studio的内部组件和  的'带外'分量,我们可以在一个更更新  频繁的时间表。目前,我们正在寻找如何才能更新  更频繁节奏的核心组件。在EF 2011年6月  CTP是我们在航运核心部件更首次尝试  频繁,它已经成为明确的,我们只是在技术上并不准备  做到这一点呢。

核心组件包括:

      
  • 核心EF运行时(System.Data.Entity.dll&安培; System.Web.Entity.dll)
  •   
  • EF设计师
  •   

带外的组件包括:(我们可能会更多的船带外  在未来的组件)

Out of band components include: (We will likely ship more out of band components in the future)

      
  • 的的DbContext API和放大器; $ C C一(EntityFramework.dll)$
  •   
  • T4模板使用的DbContext API和模型优先和放大器;数据库首页
  •   
  • 在EF电动工具
  •   
  • $ C C首先迁移$
  •   
  • The DbContext API & Code First (EntityFramework.dll)
  • T4 Templates for using DbContext API with Model First & Database First
  • EF Power Tools
  • Code First Migrations

(引自here.)

这意味着,对于EF 枚举的支持将是.NET 4.5核心库的一部分,而不是下载的EF 5的NuGet包。因此,像枚举和空间支持新的EF功能不可用与.NET 4.0。

That means that enum support for EF will be part of the .NET 4.5 core libraries and not of the downloadable EF 5 NuGet package. Hence the new EF features like enum and spatial support are not available together with .NET 4.0.

更多关于历史和原因,从EF的NuGet包分离EF核心库的是在这里:http://blogs.msdn.com/b/adonet/archive/2011/10/18/how-we-talk-about-ef-and-its-future-versions.aspx

More about the history and reason of separating "EF Core libraries" from "EF NuGet package" is here: http://blogs.msdn.com/b/adonet/archive/2011/10/18/how-we-talk-about-ef-and-its-future-versions.aspx

这篇关于是否有技术原因EF 5不完全支持.NET4.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 18:27