builder.Services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true)
.AddRoles<IdentityRole>() // Corrigir o erro: InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.RoleManager`1[Microsoft.AspNetCore.Identity.IdentityRole]' while attempting to activate. Adicione esta linha
.AddEntityFrameworkStores<ApplicationDbContext>();
Nenhum comentário:
Postar um comentário