【发布时间】:2017-10-28 10:30:37
【问题描述】:
我正在将以前工作的应用程序从 WebForms 网站移动到 Web 应用程序。当我尝试实现实体框架引用时,系统无法识别实体模型。我有一个保存为“CustomerSurveyDBEntities.edmx”的数据模型,NuGet 显示我安装了 EntityFramework v6.1.3。它显示 System.Data.Entity 当前未在此范围内使用。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
//...this is greyed out
using System.Data.Entity;
//...
//This is where my entity model is no longer recognized
using (CustomerSurveyDBEntities myEntities = new CustomerSurveyDBEntities())
【问题讨论】:
标签: asp.net entity-framework webforms