I have an ASP.NET MVC 4 web app and I'm defining connection strings in my web.config
. I'm using SimpleMembership which by default wants to use a connection string with the name DefaultConnection
I'm also using EntityFramework 5
to access the same database and store my app data. My EntityFramework
context is called AppContext
. Therefore, my context wants to by default use a connection string with the name AppContext
.
My current solution is to define two connection strings:
<add name="DefaultConnection" connectionString="REMOVED" providerName="System.Data.SqlClient" />
<add name="AppContext" connectionString="REMOVED" providerName="System.Data.SqlClient" />
What's the commonly used solution here? I assume this is a common scenario and people are either overriding the default name of the EntityFramework connection string or the SimpleMembership connection string.