Marko Apfel - Afghanistan/Belgium/Germany

Management, Architecture, Programming, QA, Coach, GIS, EAI

  Home  |   Contact  |   Syndication    |   Login
  187 Posts | 2 Stories | 201 Comments | 4 Trackbacks


Twitter | LinkedIn | Xing


Post Categories

Image Galleries



Enterprise Library


SQL Server


With Entity Framework 5 in Visual Studio 2012 the code first feature could let you come to the question “Where is the automatically created database located?”

I run in the question after changing the model which throws during the next run this error:

“The model backing the 'MyContext' context has changed since the database was created. Consider using Code First Migrations to update the database (”

Okay – clear I thought “delete the database”. But where is the database and what type is it???

In this constellation the frameworks generates a localDB.

You could access this database via SQL Server Object Explorer. For the first time you have to add this localDB. The server name is “(localdb)\v11.0”:


And so we could browse through the content of this database. It got the same name like the context class.


posted on Saturday, October 20, 2012 5:26 PM