I'm using entity Framework 6 DBContext , Database First.
I have created the Model using wizard form an existing SQL server database. Now on the app.config file , this connection string :
<connectionStrings>
<add name="MyEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl| res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=My_PC;initial catalog=MyDatabase;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
This is working on a PC with SQL server installed. But if I try on a pc with SQL server Express , this is not working ( of course I have changed in the connection string the PC name. The database name is the same ).
What should I change in the above connection string in order to make it work on a SQL server express ?
My goal is to make this programmatically , so when my application is start , to test if is a SQL server or SQL server express environment and to make the changes on the app.config file .
Thank you !