Seed database for Identity 2
问题 I came across a problem for seeding the database with Identity v2. I separated out the IdentityModel from the MVC5 project to my Data Access Layer where I setup EF Migrations as well. So I commented out the code which use inside "IdentityConfig.cs" to create initial user and put the code inside my seed database that looks like this protected override void Seed(Repository.DataContext.IdentityDb context) { // var userManager = HttpContext.Current.GetOwinContext().GetUserManager