上线的Entity Framework 4.1候选发布版(一个月后将发布最终版本)

image

I was in Redmond this last week and talked to Jeff Derstadt, the Lead Developer on Entity Framework Code First (or, as I say, EF Magic Unicorn). What's the deal with this new feature in Entity Framework? What about the bad rap that EF got back in the day? What's new in EF4 and how does EF Code First sit on that? Which is the right choice, Model First, Database First or Code First? All of this plus demos in this off-the-cuff interview. There's lots of good info in this video including some insight into much needed migrations. Hint: They are working on them!

上周,我在Redmond,与Entity Framework Code First(或我所说的EF Magic Unicorn)的首席开发人员Jeff Derstadt进行了交谈。 Entity Framework中的新功能如何处理? EF当天收到的不良说唱怎么样? EF4中有什么新功能,以及EF Code First如何处理? 正确的选择是“模型优先”,“数据库优先”或“代码优先”? 所有这些以及本次采访中的演示。 该视频中有很多很好的信息,包括对急需的迁移的一些见解。 提示:他们正在努力!

This week, the Entity Framework team put out a Release Candidate of Entity Framework 4.1, and are planning a final release in a month. Hm, what conference happens in a month?

本周,Entity Framework团队发布了Entity Framework 4.1的候选发布版本,并计划在一个月内发布最终版本。 嗯,一个月内举行什么会议?

The EF 4.1 RC is now publicly available (“ADO.NET Entity Framework 4.1 Release Candidate” for short, doh!) It's cool that they are able to do out of band releases for things like this, so we don't have to wait a year or more for new functionality.

EF 4.1 RC现在是公开可用的(简称“ ADO.NET Entity Framework 4.1 Release Candidate”,do!)很酷的是,他们能够为此类事情进行带外发布,因此我们不必等待新功能需要一年或更长时间。

Note that while CodeFirst is awesome, EF4.1 is not just about Code First, the DbContext API is equally applicable to Database First and Model First and EF 4.1 includes new code generation item templates for customers working with the EDM designer.

请注意,虽然CodeFirst很棒,但EF4.1不仅与Code First有关,DbContext API同样适用于Database First和Model First,并且EF 4.1包括新的代码生成项模板,供使用EDM设计器的客户使用。

EF 4.1 RC中有什么? (What’s in EF 4.1 RC?)

From their blog, the ADO.NET Entity Framework 4.1 RC introduces two new features:

ADO.NET实体框架4.1 RC从他们的博客中引入了两个新功能:

  • The DbContext API is a simplified abstraction over ObjectContext and a number of other types that were included in previous releases of the ADO.NET Entity Framework. The DbContext API surface is optimized for common tasks and coding patterns. DbContext can be used with Database First, Model First and Code First development.

    DbContext API是ObjectContext和ADO.NET实体框架的早期版本中包含的许多其他类型的简化抽象。 DbContext API表面针对常见任务和编码模式进行了优化。 DbContext可以与数据库优先,模型优先和代码优先开发一起使用。

  • Code First is a new development pattern for the ADO.NET Entity Framework and provides an alternative to the existing Database First and Model First patterns. Code First is focused around defining your model using C#/VB.NET classes, these classes can then be mapped to an existing database or be used to generate a database schema. Additional configuration can be supplied using Data Annotations or via a fluent API.

    代码优先是ADO.NET实体框架的新开发模式,它为现有的数据库优先和模型优先模式提供了替代方法。 Code First的重点是使用C#/ VB.NET类定义模型,然后可以将这些类映射到现有数据库或用于生成数据库架构。 可以使用数据注释或通过流畅的API提供其他配置。

And an unfortunate but necessary NuGet gotcha, as the package as been renamed.

还有一个不幸但必要的NuGet陷阱,因为该包已重命名。

NuGet包重命名 (NuGet Package Rename)

Previous releases of Code First were made available as the "EFCodeFirst" NuGet package. The EF 4.1 RC release contains features that are also applicable to Model First and Database First development, therefore we have chosen to adopt the "EntityFramework" package name for this release, and future releases. If you are currently using the "EFCodeFirst" package you will need to swap to the "EntityFramework" package to get the supported go-live release. If you own a package that depends on ‘EFCodeFirst’ we would encourage you to swap the dependency over to the ‘EntityFramework’ package as soon as possible.

以前的Code First版本已作为EFCodeFirst ” NuGet软件包提供。 EF 4.1 RC版本包含的功能也适用于“模型优先”和“数据库优先”开发,因此,我们选择为该版本和将来的版本采用“ EntityFramework ”程序包名称。 如果当前正在使用“ EFCodeFirst”包,则需要交换到“ EntityFramework”包以获取受支持的实时发布。 如果您拥有依赖于'EFCodeFirst'的程序包,我们建议您尽快将依赖项交换到'EntityFramework'程序包。

Have you implemented the NuGet Action Plan? Get on it, it'll take only 5 minutes: NuGet Action Plan - Upgrade to 1.1, Setup Automatic Updates, Get NuGet Package Explorer.

您是否执行了NuGet行动计划 马上开始,只需5分钟: NuGet行动计划-升级到1.1,设置自动更新,获取NuGet软件包资源管理器

相关链接 (Related Links)

翻译自: https://www.hanselman.com/blog/entity-framework-41-release-candidate-with-golive-with-final-release-to-follow-in-a-month

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值