.NET4.0 不完全支持 EF 5 是否存在技术原因? [英] Are there technical reasons EF 5 isn't fully supported on .NET4.0?

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

问题描述

我想将我的应用升级到 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 和代码优先开发
  • 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 Framework June 2011 CTP) 发布enum、空间支持和其他新功能(代码优先迁移除外)作为 .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’是我们第一次尝试更多地运送核心组件经常而且很明显我们只是在技术上还没有准备好做这个.

There are two logical parts to the Entity Framework, the core components that ship inside the .NET Framework and Visual Studio and the ‘out of band’ components that we can update on a much more frequent schedule. We are currently looking at how we can update the core components on a more frequent cadence as well. The ‘EF June 2011 CTP’ was our first attempt at shipping the core components more frequently and it’s become clear we’re just not technically ready to do this yet.

核心组件包括:

  • 核心 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 &代码优先(EntityFramework.dll)
  • 用于将 DbContext API 与 Model First & 结合使用的 T4 模板数据库优先
  • EF 电动工具
  • 代码优先迁移

(引用自 此处.)

这意味着对 EF 的 enum 支持将成为 .NET 4.5 核心库的一部分,而不是可下载的 EF 5 NuGet 包的一部分.因此,像 enum 和空间支持这样的新 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 Core 库"与EF NuGet 包"分离的历史和原因的更多信息,请访问: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

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆