发布Web应用程序ASP.NET MVC(数据库第一)

时间:2014-05-25 12:28:54

标签: c# asp.net-mvc entity-framework

如何添加EntityFrameWork模型来构建dll?发布应用程序页面后使用模型不起作用。 连接字符串:

<add name="printerServiceDbConnection" connectionString="workstation id=printerServiceDb.mssql.somee.com;packet size=4096;user id=dmitry_SQLLogin_1;pwd=1svt28jh1f;data source=printerServiceDb.mssql.somee.com;persist security info=False;initial catalog=printerServiceDb" providerName="System.Data.SqlClient" />
  <add name="printerServiceDbEntities" connectionString="metadata=res://*/EFModel.csdl|res://*/EFModel.ssdl|res://*/EFModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=printerServiceDb.mssql.somee.com;initial catalog=printerServiceDb;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

1 个答案:

答案 0 :(得分:0)

通过包管理器控制台添加实体框架包,它将自动引用dll&#39;

PM> Install-Package EntityFramework -Version 5.0.0

enter image description here