获取错误“关键字不受支持:'providername'”
下面是我的代码。
public DataContext(string ServerName,string ClientDatabaseName, string SQL_Server_ID, string SQL_Server_Password)
//: base("data source=USS002\\I72016;initial catalog =" + database + ";Integrated Security=True")
//: base("Data Source=" + ServerName + ";Initial Catalog=" + ClientDatabaseName + ";Integrated Security=True;User ID=" + SQL_Server_ID + "; Password=" + SQL_Server_Password + "")
: base("metadata =res://*/Models.OrderStream_DemoCompany.csdl|res://*/Models.OrderStream_DemoCompany.ssdl|res://*/Models.OrderStream_DemoCompany.msl;provider=System.Data.SqlClient;provider connection string=';" + "data source=" + ServerName + ";initial catalog=" + ClientDatabaseName + ";user id=" + SQL_Server_ID + ";password=" + SQL_Server_Password + ";MultipleActiveResultSets=True;App=EntityFramework'; providerName=\"System.Data.EntityClient\"")
{
}