Quite simple actually … make sure the connection string in your config file is named the same as your context class OR make sure you do something like this public MyContextName : base(“connectionstringname”).

It’s also worth checking the name of the connection string being used in the configuration file for the start up project if your data context is in a class library as this is the connection string that will be used.

RIP FireFox (at least until v30 anyway).
Entity Framework Code First Migrations and Running SQL Scripts

Leave a Comment

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.