Merge MyDbContext with IdentityDbContext

  1. Move the ApplicationUser definition to your DAL.
  2. Inherit your MyDbContext from IdentityDbContext<ApplicationUser> or IdentityDbContext
  3. OnModelCreating – Provide the foreign key info.
  4. Pass MyDbContext while creating the UserManager<ApplicationUser>

Leave a Comment