I wrote a Windows project and it works on the local database
This is the main connection string on the sql server:
<add name="Accounting_DBEntities" connectionString="metadata=res://*/AccountingModel.csdl|res://*/AccountingModel.ssdl|res://*/AccountingModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=Accounting_DB;integrated security=True;trustservercertificate=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
I got the express version of my database, but in the app config , the sqlexpress connection string does not connect
<add name="Accounting_DBEntities" connectionString="metadata=res://*/AccountingModel.csdl|res://*/AccountingModel.ssdl|res://*/AccountingModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.sqlexpress;AttachDbFileName=|DataDirectory|Accounting_DB.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
New contributor
Hesam Khanpour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3