DBContext,DBSet的引用在实体框架中 [英] References for DBContext, DBSet<> in Entity Framework

查看:203
本文介绍了DBContext,DBSet的引用在实体框架中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用最新的Entity Framework 4.0的ADO.Net Codefirst功能。作为其中的一部分,我已经安装了实体框架CTP 4 从Microsft并使用 Scott的教程首先创建模型。在本教程中指定了 DBContext DBSet 。可能有些人会告诉你要使用什么参考来访问这个类。



我使用了以下引用,但是对于 DBContext DBSet<>




  • System.Data。实体

  • System.Data.Entity.Design


解决方案

p>请改用 CTP5 它是较新版本的API有一些变化。您必须添加对安装在CTP目录中的EntityFramework.dll的引用 - 默认为:c:\Program Files\Microsoft ADO.NET实体框架功能CTP5 \Binaries \EntityFramework.dll,用于32位系统。在64位系统上,它将被放置在程序文件(x86)中。


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.

I have used the following references however nothing happens for DBContext and DBSet<>

  • System.Data.Entity
  • System.Data.Entity.Design

解决方案

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆