How do I change the connection string in a code first entity framework/MVC application? I\'m trying to transfer it to a live site, but it overlooks web config values and st
The connection string or its name can be passed to constructor of DbContext
. If you are using default constructor it searches for the connection string with the same name as the name of your derived context class and if it doesn't find it, it uses this one:
Data Source=.\SQLEXPRESS; Integrated Security=True; MultipleActiveResultSets=True
With database name same like your context class.