实体框架的升级,从V4到V4.1(RC)实体、框架、RC

2023-09-04 02:29:16 作者:空瞳里的绝望

实体框架v4.1RC 是出来。是否有一个良好的理由的没有的开始工作,现在升级时我的软件的发布日期为1-2个月提前?

Entity Framework v4.1RC is out. Is there a good reason not to start working on upgrading now when the release date for my software is 1-2 months ahead?

请问一个升级产生断裂从4变为4.1?什么注意事项?

Will a upgrade cause breaking changes from 4 to 4.1? Any caveats?

推荐答案

您不需要升级。 EF 4.1仅仅是额外的库。它主要包含

You don't need to upgrade. EF 4.1 is just additional library. It mainly contains

的DbContext API code-第一开发方法

code-首先可能不是你所期待的时刻。如果您使用的是ObjectContext的API和EDMX + POCO T4模板,你可以继续使用它。从您的角度来看EF 4.1只是不同的API来这样做。它有一些优点(但也有一些缺少的功能),但它不这样做返工上已经运行的项目的原因。您可以使用从EF 4.1的一些功能在paralel您的EF 4.0 code - 例如强类型包含可用的扩展方法 IQueryalbe 接口。

Code-first is probably not what you are looking for at the moment. If you are using ObjectContext API and EDMX + POCO T4 template you can continue with it. From your point of view EF 4.1 is just different API to do the same. It has some advantages (but also some missing features) but it is not the reason to do rework on already running projects. You can use some features from EF 4.1 in paralel with your EF 4.0 code - for example strongly typed Include extension method available on IQueryalbe interface.