public UsersService(TravelDreamDbContext context, RoleManager <IdentityRole> roleManager, SignInManager <User> signInManager, UserManager <User> userManager, IMapper autoMapper)
 {
     this._context      = context;
     this._roleManager  = roleManager;
     this._autoMapper   = autoMapper;
     this.SignInManager = signInManager;
     this.UserManager   = userManager;
 }
Exemple #2
0
        public async Task InvokeAsync(HttpContext httpContext, TravelDreamDbContext dbContext, RoleManager <IdentityRole> roleManager, UserManager <User> userManager, IDiscountsService discountsService)
        {
            this._roleManager = roleManager;
            this._userManager = userManager;
            this.SeedRoles(roleManager, userManager);
            await this.SeedDiscounts(discountsService);

            await this.SeedAdmin(roleManager, userManager);

            await this._next(httpContext);
        }