VS2010 EntityFramework 安装

如果点击“工具”菜单,没有"Library Package Manager"子菜单,可以点击“扩展管理器”然后进行下载。并安装。如下图所示。重新启动VS即可。搜索关键字为“NuGet”


 

点击“工具”菜单下的“Library Package Manager”子菜单下的“ Package Manager Console”菜单选项,如图所示。


在窗口中输入如下命令后回车,如图所示  

Install-Package EFCodeFirst         

 

就安装成功了。

如果上述的安装方式不可以,可以试试详细安装步骤。

详细步骤如下:

1.先输入:get-package -remote -filter entityframework  取出相应的版本号。

2.然后安装需要的包和版本:install-package -id EFCodeFirst -Version 1.1

运行结果为:

PM> install-package -id EFCodeFirst -Version 1.1
未安装“EntityFramework (≥ 4.1.10331.0)”。正在尝试从源检索依赖项...
完成
You are downloading EntityFramework from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkID=211010. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
已成功安装“EntityFramework 4.1.10331.0”
已成功安装“EFCodeFirst 1.1”
已成功将“EntityFramework 4.1.10331.0”添加到 EFWebSite
已成功将“EFCodeFirst 1.1”添加到 EFWebSite


第二步中:两个参数,一个是Id,一个是Version。

install-package -id 包名 -Version 版本

如安装EntityFramework。

那么输入:install-package -id EntityFramework -Version 4.1.10331.0  即可。


 

零起点学习数据库访问,使用刚刚发布的 EF 4.1。Entity Framework 4.1 EFCodeFirst 入门教程

http://topic.csdn.net/u/20110414/10/06526263-9e0d-491f-b963-7ae0afd1f7e4.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值