Been playing around with the Code First feature of Entity Framework 4.1 using an ASP.NET MVC 3 project.
However the database (SQL Server 2008 R2) does not automatically
I know this was already answered by mazatsushi in the rightest way. But just to clarify it to begginers: Based in mazatsushi's answer what you have to do is to write:
Database.SetInitializer(new DropCreateDatabaseIfModelChanges());
using (var context = new SorteoContext())
{
context.Database.Initialize(force: true);
}
inside Application_Start() function in Global.asax.cs and Boom! works!