参考的DbContext,DBSet<>在实体框架 [英] References for DBContext, DBSet<> in Entity Framework
问题描述
我想使用最新的实体框架4.0的ADO.Net Codefirst功能。正如我已经安装了实体框架CTP的一部分从4的Microsft 并使用的斯科特的教程先创建模型。本教程里面的DbContext
和 DBSet<>
中指定。可能有些分不清什么是为了访问这个类中使用的参考。
I am trying to use ADO.Net Codefirst feature of latest Entity Framework 4.0. As part of that I have installed Entity Framework CTP 4 from Microsft and using Scott's tutorial to create the model first. Inside the tutorial DBContext
and DBSet<>
is specified. Could some tell what is the reference to be used in order to access this class.
我用下面引用但是什么也没有发生在的DbContext
和 DBSet<>
I have used the following references however nothing happens for DBContext
and DBSet<>
- System.Data这。实体
- System.Data.Entity.Design
推荐答案
使用 CTP5 的相反,它是较新版本一些变化的API。你必须添加引用它安装在CTP目录EntityFramework.dll - 默认为:C:\Program Files\Microsoft ADO.NET实体框架特性CTP5\Binaries\EntityFramework.dll为32位系统。在64位系统中会被放置在程序文件(x86)。
Use CTP5 instead it is newer version with some changes in API. You have to add reference to EntityFramework.dll which is installed in CTP directory - default is: c:\Program Files\Microsoft ADO.NET Entity Framework Feature CTP5\Binaries\EntityFramework.dll for 32bit system. On 64bit system it will be placed in Program Files (x86).
这篇关于参考的DbContext,DBSet<>在实体框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!