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. 如何安装Microsoft Visual C++6.0

    Microsoft Visual C++6.0作为新手C语言编程软件,被大家广为使用,然而许多人为拷贝来的C++6.0安装包如何安装感到苦恼,因此许多同学都是以安装失败,安装不成 功而告终.接下来我就 ...

  2. 做什么职业,也别做程序员,尤其是Java程序员

    千万别做程序员,尤其别做Java这种门槛低,入门快的程序员(别跟我说Java搞精通了也很牛之类的,原因不解释,做5年以上就知道了),程序员本来就是我见过最坑爹的职业了...Java程序员更是,现在满地 ...

  3. LeetCode Employee Importance

    原题链接在这里:https://leetcode.com/problems/employee-importance/description/ 题目: You are given a data stru ...

  4. 异常:SQL Error: 1064, SQLState: 42000

    在MySQL中,有很多字符被MySQL保留了.如果你用来做列名或者表名就会出现问题. 我这里出现的问题是采用了order作为表明,这是一个保留字,所以出现问题.

  5. Redis 分布式锁 - 分布式锁的正确实现方式

    前言 分布式锁一般有三种实现方式:1. 数据库乐观锁:2. 基于Redis的分布式锁:3. 基于ZooKeeper的分布式锁.本篇博客将介绍第二种方式,基于Redis实现分布式锁.虽然网上已经有各种介 ...

  6. think python chapter2

    1.An assignment statement creates a new variable and gives it a value: Variable names can be as long ...

  7. 第九课 go的循环语句

    1 for语句的三种形式 /* for 循环 */ ; a < ; a++ { fmt.Printf("a 的值为: %d\n", a) } var a, b int = 1 ...

  8. django的settings.py设置session

    ############ # SESSIONS # ############ SESSION_CACHE_ALIAS = 'default' # Cache to store session data ...

  9. S2-045漏洞利用工具&解决方案

    简单的重复造一个轮子,漏洞危害蛮大的 影响版本:Struts 2.3.5 - Struts 2.3.31,Struts 2.5 - Struts 2.5.10 仅供学习测试使用,严禁非法操作! 下载链 ...

  10. 2015.5.9 C#编写DLL及C#调用C#DLL

    过程比C#调用VC++dll简单. 一.创建DLL 新建工程,类型选择类库,生成的结果就是dll 注意:在项目属性-应用程序中,注意三个地方,程序集名称和默认命名空间可以调整,但要一致,别的程序调用此 ...