I am a little confused on the code first entity framework database.
I created a new DbContext and class that I will be storing in that context, like this:
Yep - based on the parameter in your defaultConnectionFactory it looks like you're using the default SQL 2014 instance, not the 2012 instance.
The (localdb)\ProjectsV12 instance is created by SQL Server Data Tools (SSDT)
(localdb)\MSSQLLocalDB is the SQL Server 2014 LocalDB default instance name
And (localdb)\v11.0 is the SQL Server 2012 LocalDB default instance name
You need to set your database server as (LocalDB)\MSSQLLocalDB
. This is a change made to EF 6.1.1 onwards. The MSSQLLocalDB is mentioned in your parameter. More details on the change can be found here https://entityframework.codeplex.com/workitem/2246
MSSQLLocalDB is the default instance name on SQL Server 2014 whereas v11.0 is the default Instance name on SQL Server 2012
using (var db = new BloggingContext())
{
var connectionString = db.Database.Connection.ConnectionString;
Console.WriteLine(connectionString);
}
The above code uses the Microsoft example; for BloggingContext substitute your DbContext
class. It will give you the connection string that the entity framework is using, which includes the instance name.