Класс роли моего приложения
public class ApplicationRole : IdentityRole
{
public string Description { get; set; }
public DateTime RegisterDate { get; set; }
public ApplicationRole()
{
}
public ApplicationRole(string roleName) : base(roleName) { }
public ApplicationRole(string roleName, string roleDescription) : base(roleName)
{
Description = roleDescription;
}
}
Класс диспетчера роли моего приложения
public class ApplicationRoleManager : RoleManager<ApplicationRole>
{
public ApplicationRoleManager(ApplicationRoleStore roleStore,
IEnumerable<IRoleValidator<ApplicationRole>> roleValidators,
ILookupNormalizer keyNormalizer,
IdentityErrorDescriber errors,
ILogger<ApplicationRoleManager> logger) :
base(roleStore , roleValidators, keyNormalizer, errors, logger)
{
}
}
Класс хранилища ролей моего приложения
public class ApplicationRoleStore : RoleStore<ApplicationRole, ApplicationDbContext>
{
public ApplicationRoleStore(ApplicationDbContext dbContext,
IdentityErrorDescriber identityErrorDescriber) :
base(dbContext, identityErrorDescriber)
{
}
}
И ApplicationDbContext
public class ApplicationDbContext : IdentityDbContext
{
private readonly IConfiguration _configuration;
private readonly IHttpContextAccessor _httpContextAccessor;
public ApplicationDbContext(DbContextOptions dbContextOptions, IHttpContextAccessor httpContextAccessor,IConfiguration configuration)
: base(dbContextOptions)
{
_configuration = configuration;
_httpContextAccessor = httpContextAccessor;
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
}
}
Когда я пишу это Дайте мне ошибку:
private readonly ApplicationRoleManager<ApplicationRole> _roleManager;
Класс ApplicationRoleManager доза не имеет параметров типа
Я не могу понять, Где моя ошибка.