Entity Framework Code First and Connection Strings
问题 I have a small MVC 3 app using Entity Framework Code First and use this connection string for the model: data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|Journal.mdf;User Instance=true;Database=MyJournal When I make a change to the model (e.g. add a property), I get as expected The model backing the 'JournalContext' context has changed since the database was created. So, being in development mode, I go ahead and delete Journal.mdf and Journal.ldf. Now when I