コード例 #1
0
 protected BaseService(
     F1CafeDbContext dbContext,
     IMapper mapper)
 {
     this.DbContext = dbContext;
     this.Mapper    = mapper;
 }
コード例 #2
0
 public UserService(F1CafeDbContext dbContext,
                    IMapper mapper,
                    UserManager <F1CafeUser> userManager,
                    RoleManager <IdentityRole> roleManager,
                    SignInManager <F1CafeUser> signInManager,
                    ILogger <UserService> logger)
     : base(dbContext, mapper)
 {
     this.userManager   = userManager;
     this.roleManager   = roleManager;
     this.signInManager = signInManager;
     this.logger        = logger;
 }
コード例 #3
0
        public static void Seed(F1CafeDbContext dbContext, RoleManager <IdentityRole> roleManager)
        {
            if (dbContext == null)
            {
                throw new ArgumentNullException(nameof(dbContext));
            }

            if (roleManager == null)
            {
                throw new ArgumentNullException(nameof(roleManager));
            }

            SeedRoles(roleManager);
        }
コード例 #4
0
        public static void Seed(F1CafeDbContext dbContext, IServiceProvider serviceProvider)
        {
            if (dbContext == null)
            {
                throw new ArgumentNullException(nameof(dbContext));
            }

            if (serviceProvider == null)
            {
                throw new ArgumentNullException(nameof(serviceProvider));
            }

            var roleManager = serviceProvider.GetRequiredService <RoleManager <IdentityRole> >();

            Seed(dbContext, roleManager);
        }
コード例 #5
0
 public RaceService(F1CafeDbContext dbContext, IMapper mapper)
     : base(dbContext, mapper)
 {
 }
コード例 #6
0
 public ScheduleService(F1CafeDbContext dbContext, IMapper mapper)
     : base(dbContext, mapper)
 {
 }
コード例 #7
0
 public GlobalExceptionFilter(F1CafeDbContext dbContext,
                              ITempDataDictionaryFactory tempDataFactory)
 {
     this.dbContext       = dbContext;
     this.tempDataFactory = tempDataFactory;
 }
コード例 #8
0
 public DriverService(F1CafeDbContext dbContext, IMapper mapper)
     : base(dbContext, mapper)
 {
 }