I have an ASP.NET MVC 5 project (razor engine) which has Identity 2.0 with Individual User Accounts. I am using Visual Studio Professional 2013
I have not found any clea
To complete this question.. As Corneliu Serediuc said all you need to do is simply try to connect to database during application startup, for example, like this (IdentityModel.cs):
public class ApplicationDbContext : IdentityDbContext
{
public ApplicationDbContext()
: base("DefaultConnection", throwIfV1Schema: false)
{
Database.SetInitializer(new ApplicationDbInitializer());
}
public static ApplicationDbContext Create()
{
var ctx = new ApplicationDbContext();
var runSeed = ctx.Roles.AnyAsync();
return ctx;
}
} By the way, Corneliu thank you for your code examples, they help me a lot.