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. SQL夯实基础(五):索引的数据结构

    数据量达到十万级别以上的时候,索引的设置就显得异常重要,而如何才能更好的建立索引,需要了解索引的结构等基础知识.本文我们就来讨论索引的结构. 二叉搜索树:binary search tree 1.所有 ...

  2. LeetCode Maximum Length of Pair Chain

    原题链接在这里:https://leetcode.com/problems/maximum-length-of-pair-chain/description/ 题目: You are given n  ...

  3. [ Laravel 5.5 文档 ] 处理用户请求 —— HTTP 请求的过滤器:中间件

    [ Laravel 5.5 文档 ] 处理用户请求 —— HTTP 请求的过滤器:中间件 http://laravelacademy.org/post/7812.html 简介 中间件为过滤进入应用的 ...

  4. 获取url参数并且中文不乱码的方法

    function getUrlArgument(name) { var reg = new RegExp("(^|&)" + name + "=([^&] ...

  5. CountDownLatch和cyclicbarrier的使用

    CountDownLatch: 一个同步辅助类,在完成一组正在其他线程中执行的操作之前,它允许一个或多个线程一直等待. 用给定的计数初始化 CountDownLatch.由于调用了 countDown ...

  6. 使用 DOM对象,控制HTML元素 来制作的一个简单的表格

    制作一个表格,显示班级的学生信息. 要求: 1. 鼠标移到不同行上时背景色改为色值为 red,移开鼠标时则恢复为原背景色 white 2. 点击添加按钮,能动态在最后添加一行 3. 点击删除按钮,则删 ...

  7. composer的安装和使用

    由于工作中需要用到leancloud的LeanCloud PHP SDK,支持composer安装,所以就下载composer工具了, 安装之前可以用composer命令检测是否已经安装了,命令是:c ...

  8. L2-005. 集合相似度(set使用)

    L2-005. 集合相似度 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 给定两个整数集合,它们的相似度定义为:Nc/Nt*1 ...

  9. shell脚本 回顾 小练习

    1.把/OPT目录下(包含子目录)下所有后缀为“.sh”的文件后缀变更为“.shell” 2.将A.B.C目录下的文件A1.A2.A3文件改名为A4.A5.A63.如何在vi模式下将文件中的aa字符串 ...

  10. 2015.12.14 MDI(多文档窗口结构)设置基本解决,折腾一天,部分解决存在已久的问题。但效果仍不如临时航线的MDI窗体结构。

    创建从一个窗口弹出多个子窗口的结构叫MDI窗体结构 如果不按MDI结构管理,最简单的做法是: 在窗体A上添加菜单或按钮,在菜单或按钮事件中添加弹出B窗体代码: B b = new B(); b.sho ...