2

I am working on a new project and want to use EF. My last project used EF4 and it was installed as part of VS 2010 (or 8).

In this project, I am using VS 2012 which seems to want me to download EF instead. No worries, I went to Extensions and Updates and entered Entity Framework.

There seem to be a large number of versions of EF 4, 5, and the beta of 6.

There doesn't seem to be a lot of information on how to choose the appropriate item to download.

I think I should use 5 since I have found that using beta versions sometimes cause delays, especially since they don't plan to release the RTM version until the next version of VS.

And then I need to know which file(s) to download.

My project is to write an app that will replace an existing app using an SQL database - so I need a data first implementation.

What I don't want to do is find out that I have spent tons of time trying to figure out a problem that is simply due to the fact that I didn't download the correct version....

Any suggestions on which version (EF 4,5, or 6) and which package for that version I should use?

Thanks!

4

3 回答 3

2

由于您正在开始一个新项目,因此请使用最新的非 beta 版本的框架。您没有指定任何将您与旧版本联系在一起的要求,而且您似乎没有立即需要探索可能不稳定/不受支持的 beta 版本中的新功能。

于 2013-06-17T20:41:19.497 回答
2

建议(如 SLaks 所说)您应该通过 NuGet 添加 EF。如果您对有关每个版本支持的功能的详细信息感兴趣,我将从这里开始:

http://msdn.microsoft.com/en-us/library/hh551137%28VS.103%29.aspx

从这个页面有一个版本历史的链接,您可以在其中阅读有关每个版本更新内容的摘要:

http://msdn.microsoft.com/en-US/data/jj574253

至于我会做什么,选择最新的稳定版本。不知道为什么,如果有原因的话,EF 社区会发布一个不比它的前身更好的稳定版本。

由于您可能不熟悉 EF,我还想推荐:

http://msdn.microsoft.com/en-US/data/ef

通过 NuGet 的 PS 实体框架 5.0:

http://nuget.org/packages/EntityFramework/5.0.0

于 2013-06-17T20:48:18.557 回答
0

SLacks 为我指明了正确的方向。我查看了 Extensions(其中包含各种 EF 附加组件),我需要的是使用 NuGet - 我现在已经完成了。

我知道这对很多人来说是显而易见的,但对很多人来说,但我习惯于安装应用程序并使用安装程序添加/删除功能。我确信有很多不同的方法来安装功能是有充分的理由的,但它确实增加了一些人需要学习的复杂性——尤其是因为每种方法的实现方式完全不同。

再次感谢。

于 2013-06-17T21:00:37.113 回答