Marko Apfel - Afghanistan/Belgium/Germany

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

  Home  |   Contact  |   Syndication    |   Login
  173 Posts | 2 Stories | 140 Comments | 4 Trackbacks

News



Twitter | LinkedIn | Xing

Article Categories

Archives

Post Categories

BizTalk

C#

Enterprise Library

SAP

SQL Server

Technologie

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 (http://go.microsoft.com/fwlink/?LinkId=238269).”

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”:

image

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

image

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