I am trying to replicate an example found on MSDN. I am using ASP.NET and EF 4.1 (CTP?). I\'ve used NuGet to install the EntityFramework package.
I am getting this e
One other thing to consider if you're using EF Code First is that it sometimes doesn't automatically create the backing database to your DbContext class. The solution is to add your own connection string - you can use the connection string that may be present to handle the user/registration database that backs the Simple Membership Provider, as a template. Finally, you will need to add a default constructor for the DbContext class you created:
public ChaletDb():base("ChaletConnection")
{
}
Here, the name of the connection string as you entered in your web.config file is used to direct the DbContext to create the database. Very occasionally, I've had to manually create the database (in SQL Server Management Studio) which prompted it to work.