从零开始构建.Net Core2.1项目的最简单方法是使用int而不是string作为ApplicationUser和ApplicationRole类的主键?我到目前为止所采取的步骤是:
public class ApplicationUser : IdentityUser<int>
public class ApplicationRole : Ident
我正在一个带有ASP.NET标识项目的空MVC实体框架中工作,试图为处理所有与用户相关的操作的IdentityController完成一个Register方法。问题是,在创建用户之后尝试使用SignInAsync方法登录时,系统找不到使用该方法的引用。WebApplication.Controllers public class IdentityController : Controller UserManager<IdentityUser&
我得到以下错误:那么,如何注入roleManager呢?我正在使用asp net core 2.0 + identity 2.2.1 public class ApplicationUser : IdentityUser<int>>()
.AddUserStore<UserStore<ApplicationUser, IdentityRol