InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.RoleManager`1[Domain.App.Identity.AppRole]' while attempting to activate 'WebApp.Areas.Identity.Pages.Account.Manage.IndexModel'. code example
Example: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.RoleManager`1[Microsoft.AspNetCore.Identity.IdentityRole]' while attempting to activate 'PathApp.Controllers.SearchPathController'.
services.AddDefaultIdentity<ApplicationUser().AddRoles<IdentityRole>().AddEntityFrameworkStores<ApplicationDbContext>();