Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public CommentsService(MyPersonalDbContext dbContext, UserManager <User> userManager)
 {
     this.dbContext   = dbContext;
     this.userManager = userManager;
 }