Quantcast
Channel: ASP.NET Core 2 - Identity - DI errors with custom Roles - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Manos Pasgiannis for ASP.NET Core 2 - Identity - DI errors with...

You have to create the IServiceScope on your own. To do this you have to replace var roleManager = serviceProvider.GetService<RoleManager<ApplicationRole>>(); with using (IServiceScope...

View Article



ASP.NET Core 2 - Identity - DI errors with custom Roles

I got this code in my Startup.cs: services.AddDbContext<ApplicationDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images