- Move the
ApplicationUser
definition to your DAL. - Inherit your
MyDbContext
fromIdentityDbContext<ApplicationUser>
orIdentityDbContext
- OnModelCreating - Provide the foreign key info.
- Pass
MyDbContext
while creating theUserManager<ApplicationUser>
转载于:https://www.cnblogs.com/shiningrise/p/5595574.html