public async Task InvokeAsync(HttpContext context, MyPersonalDbContext dbContext, UserManager <User> userManager, RoleManager <IdentityRole> roleManager) { if (!dbContext.Roles.Any()) { await this.SeedRoles(userManager, roleManager); } await this.next(context); }
public CommentsService(MyPersonalDbContext dbContext, UserManager <User> userManager) { this.dbContext = dbContext; this.userManager = userManager; }