首页 > 技术文章 > IdentityDbContext

shiningrise 2016-06-18 03:20 原文

  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>

推荐阅读