如何添加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="data source=printerServiceDb.mssql.somee.com;initial catalog=printerServiceDb;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
答案 0 :(得分:0)
通过包管理器控制台添加实体框架包,它将自动引用dll&#39;
PM> Install-Package EntityFramework -Version 5.0.0