0

Getting the the error "Keyword not supported: 'providername'"

below is my Code.

 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\"")

    {

    }
H H
  • 263,252
  • 30
  • 330
  • 514
  • See if `EntityConnectionStringBuilder` can help you. I'm not sure about versions etc. – H H Dec 23 '18 at 11:22
  • There's an abundance of info on how to format an entity connection string properly. for example here: https://stackoverflow.com/q/5781059/861716. – Gert Arnold Dec 23 '18 at 11:48

0 Answers0