Migration from Entity Framework 4.1/4.3 to Entity Framework 5.0/6.0

To migrate your existing Entity Framework 4.x project to Entity Framework 5.0 using VS2012, first target .NET Framework 4.5:

Second, remove the existing Entity Framework 4.1/4.3 reference and install Entity Framework 5.0 from NuGet:

Search for Entity Framework online and install it. Make sure that the version is 5.0:

If you check the version of the Entity Framework reference, then it should be 5.0.0.0:

If you open your existing data model (.edmx) file then it may give an error, as it is still using EDMX version 2.0 (open edmx as XML). Click on the 'Modify' link on the designer and it will be modified to version 3.0.

Now your existing Entity Framework project will work in Entity Framework 5.0 without any major changes.

Entity Framework Tutorial Basics(31):Migration from EF 4.X的更多相关文章

  1. Entity Framework Tutorial Basics(1):Introduction

    以下系列文章为Entity Framework Turial Basics系列 http://www.entityframeworktutorial.net/EntityFramework5/enti ...

  2. Entity Framework Tutorial Basics(4):Setup Entity Framework Environment

    Setup Entity Framework Environment: Entity Framework 5.0 API was distributed in two places, in NuGet ...

  3. Entity Framework Tutorial Basics(43):Download Sample Project

    Download Sample Project: Download sample project for basic Entity Framework tutorials. Sample projec ...

  4. Entity Framework Tutorial Basics(42):Colored Entity

    Colored Entity in Entity Framework 5.0 You can change the color of an entity in the designer so that ...

  5. Entity Framework Tutorial Basics(41):Multiple Diagrams

    Multiple Diagrams in Entity Framework 5.0 Visual Studio 2012 provides a facility to split the design ...

  6. Entity Framework Tutorial Basics(37):Lazy Loading

    Lazy Loading: One of the important functions of Entity Framework is lazy loading. Lazy loading means ...

  7. Entity Framework Tutorial Basics(36):Eager Loading

    Eager Loading: Eager loading is the process whereby a query for one type of entity also loads relate ...

  8. Entity Framework Tutorial Basics(34):Table-Valued Function

    Table-Valued Function in Entity Framework 5.0 Entity Framework 5.0 supports Table-valued functions o ...

  9. Entity Framework Tutorial Basics(33):Spatial Data type support in Entity Framework 5.0

    Spatial Data type support in Entity Framework 5.0 MS SQL Server 2008 introduced two spatial data typ ...

随机推荐

  1. Codeforces Round #258 (Div. 2)C(暴力枚举)

    就枚举四种情况,哪种能行就是yes了.很简单,关键是写法,我写的又丑又长...看了zhanyl的写法顿时心生敬佩.写的干净利落,简直美如画...这是功力的体现! 以下是zhanyl的写法,转载在此以供 ...

  2. python主函数

    Python的人会很不习惯Python没有main主函数. 这里简单的介绍一下,在Python中使用main函数的方法 #hello.py def foo(): str="function& ...

  3. 在Mac上激活Adobe产品

    1.在任意位置下载需要的Adobe软件(推荐官网正版) 网速不好或者不通推荐下载离线安装包: https://helpx.adobe.com/download-install/kb/creative- ...

  4. NOI模拟赛 #4

    好像只有一个串串题可以做... 不会 dp 和数据结构啊 QAQ 10 + 20 + 100 = 130 T1 一棵树,每个点有一个能量的最大容量 $l_i$ 和一个增长速度 $v_i$,每次可以选一 ...

  5. sort--Linux下文本处理五大神器之三

    转自:http://www.cnblogs.com/dong008259/archive/2011/12/08/2281214.html sort命令是帮我们依据不同的数据类型进行排序,其语法及常用参 ...

  6. Road to OI

    我学OI已经三年有余了.回首向来萧瑟处,在镜花水月一般的OI生涯面前,我不敢,也没资格称“也无风雨也无晴”.这三年我过得浑浑噩噩,玩了很多游戏,看了很多番,追过一个女孩,OI却搞得一塌糊涂.留给我的时 ...

  7. (转)配置ORACLE 11g绿色版客户端和PLSQL环境

    本文转载自:http://my.oschina.net/jang/blog/83009 本方法是通过使用ORACLE官方提供的精简版客户端,即绿色免安装的客户端. 下载地址(此处提供的是官方各版本下载 ...

  8. C++字符集问题终极分析(可解决乱码问题)

    最近研究vc,windows的东西真是很傻瓜,啥都给你做好,有个好处就是开发方便了. 有个弊端就是完全按微软的一套进行,规则都是它定的,你得知道它的很多api, 开发出来的代码效率不高,不过却可以比较 ...

  9. HTML5一些元素的整理

    address元素: 定义和用法 <address> 标签定义文档或文章的作者/拥有者的联系信息. 如果 <address> 元素位于 <body> 元素内,则它表 ...

  10. 创建github怎样管理

    创建版本库 第一步: 创建一个版本库非常简单,首先,选择一个合适的地方,创建一个空目录 $mkdir learngit $cd learngit $pwd mkdir learngit 创建一个名叫“ ...