Upgrading to EF6
In previous versions of EF the code was split between core libraries (primarily System.Data.Entity.dll) shipped as part of the .NET Framework and out-of-band (OOB) libraries (primarily EntityFramework.dll) shipped in a NuGet package. EF6 takes the code from the core libraries and incorporates it into the OOB libraries. This was necessary in order to allow EF to be made open source. The consequence of this is that applications will need to be rebuilt against the moved types.
This should be straightforward for applications that make use of DbContext as shipped in EF 4.1 and later. A little more work is required for applications that make use of ObjectContext but it still isn’t hard to do.
Here is a checklist of the things you need to do to upgrade an existing application to EF6.
![]() |
Install the EF6 NuGet package |
|
You need to upgrade to the new Entity Framework 6 runtime.
Alternatively, you can run the following command from Package Manager Console: PM> Install-Package EntityFramework
|
|
![]() |
Ensure that assembly references to System.Data.Entity.dll are removed |
|
Installing the EF6 NuGet package should automatically remove any references to System.Data.Entity from your project for you. |
|
![]() |
Swap any EF Designer (EDMX) models to use EF 6.x code generation |
|
If
|
|
![]() |
Update namespaces for any core EF types being used |
|
The Types like ObjectContext that were previously The
These types are in the Core
Note: |
Upgrading to EF6的更多相关文章
- 基于Entity Framework 6的框架Nido Framework
随着 Entity Framework 最新主版本 EF6 的推出,Microsoft 对象关系映射 (ORM) 工具达到了新的专业高度,与久负盛名的 .NET ORM 工具相比已不再是门外汉. EF ...
- Entity Framework 6 编译出错的问题(VS2012)
更新:其实这个问题是由于VS2012的EF代码生成模板是EF 5.x的,自然会与EF6 的runtime不兼容.起初我按照更新前的方式解决了,后来却发现会出现不止这一处命名空间发生改动而导致的问题. ...
- [转]Upgrading to Async with Entity Framework, MVC, OData AsyncEntitySetController, Kendo UI, Glimpse & Generic Unit of Work Repository Framework v2.0
本文转自:http://www.tuicool.com/articles/BBVr6z Thanks to everyone for allowing us to give back to the . ...
- MVC5+EF6+MYSQl,使用codeFirst的数据迁移
之前本人在用MVC4+EF5+MYSQL搭建自己的博客.地址:www.seesharply.com;遇到一个问题,就是采用ef的codefirst模式来编写程序,我们一般会在程序开发初期直接在glob ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(1)-前言与目录(持续更新中...)
开发工具:VS2015(2012以上)+SQL2008R2以上数据库 您可以有偿获取一份最新源码联系QQ:729994997 价格 666RMB 升级后界面效果如下: 任务调度系统界面 http: ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(63)-Excel导入和导出-自定义表模导入
系列目录 前言 上一节使用了LinqToExcel和CloseXML对Excel表进行导入和导出的简单操作,大家可以跳转到上一节查看: ASP.NET MVC5+EF6+EasyUI 后台管理系统(6 ...
- 【第三篇】ASP.NET MVC快速入门之安全策略(MVC5+EF6)
目录 [第一篇]ASP.NET MVC快速入门之数据库操作(MVC5+EF6) [第二篇]ASP.NET MVC快速入门之数据注解(MVC5+EF6) [第三篇]ASP.NET MVC快速入门之安全策 ...
- 【番外篇】ASP.NET MVC快速入门之免费jQuery控件库(MVC5+EF6)
目录 [第一篇]ASP.NET MVC快速入门之数据库操作(MVC5+EF6) [第二篇]ASP.NET MVC快速入门之数据注解(MVC5+EF6) [第三篇]ASP.NET MVC快速入门之安全策 ...
- VS2012+EF6+Mysql配置心路历程
为了学习ORM,选择了EntityFramework,经历了三天两夜的煎熬,N多次错误,在群里高手的帮助下,终于成功,现在将我的心路历程记录下来,一是让自己有个记录,另外就是让其它人少走些弯路. 我的 ...
随机推荐
- 调试NodeJS应用
OS:Windows 1.下载安装NodeJS 点击http://nodejs.org/界面上“Install”,下载后运行安装,默认安装到到C:\Program Files\nodejs.安装后确认 ...
- hihocode 第九十二周 数论一·Miller-Rabin质数测试
题目链接 检测n是否为素数,数据范围为2 <= n <= 10^18; 思路:Miller_Rabin素数检测模板题,原理:在Fetmat定理的基础之上,再利用二次探测定理: 对于任意的正 ...
- Centos 6.2 32位机器安装新的JDK和Weblogic
一.首先卸载自带的JDK 1.查看自带的java版本. root@admin]#java -version java version "1.6.0" OpenJDK Runtime ...
- xml & 符号表示方法,xml转义字符
HTML,xml 中<, >,&等有特别含义,(前两个字符用于链接签,&用于转义),不能直接使用.使用这三个字符时,应使用他们的转义序列,如下所示: & 或 &am ...
- Linux下 config/configure/Configure、make 、make test/make check、sudo make install 的作用
转自Linux下 config/configure/Configure.make .make test/make check.sudo make install 的作用 这些都是典型的使用GNU的AU ...
- HDOJ多校联合第六场
先一道一道题慢慢补上, 1009.题意,一棵N(N<=50000)个节点的树,每个节点上有一个字母值,给定一个串S0(|S0| <=30),q个询问,(q<=50000),每次询问经 ...
- win7安装IIS及将网站发布到IIS上
1. WIN7安装IIS: 控制面板----程序和功能-----打开或关闭windows功能,如图 展开Internet信息服务,按照下图方式进行选择,然后单击"确定",等待几分 ...
- *[codility]GenomicRangeQuery
http://codility.com/demo/take-sample-test/genomicrangequery 这题有点意思.一开始以为是RMQ或者线段树,但这样要O(n*logn).考虑到只 ...
- !!对python列表学习整理列表及数组详细介绍
1.Python的数组分三种类型:(详细见 http://blog.sina.com.cn/s/blog_6b783cbd0100q2ba.html) (1) list 普通的链表,初始化后可以通过特 ...
- Spring AOP实现方式一【附源码】
基本代理模式 纯POJO切面 源码结构: 1.首先我们新建一个接口,love 谈恋爱接口. package com.spring.aop; /** * 谈恋爱接口 * * @author Admin ...



