public static async Task InitializeAync (TransportDbContext context, IServiceProvider serviceProvider) { var roleManager = serviceProvider.GetRequiredService<RoleManager<Role>>(); foreach (string index in _roleArray) { if ((await roleManager.FindByNameAsync(index)) == null) { await roleManager.CreateAsync(new Role { Name = index }); } } }
public FuelServices(TransportDbContext context) { _context = context; }
public DayJobServices(TransportDbContext context) { _context = context; }
public DestinationRepository(TransportDbContext dbContext) : base(dbContext) { }
public UserManagementController(TransportDbContext dbContext) { _userManagementRepository = new UserManagementRepository(dbContext); _dbContext = dbContext; }
public CustomerRepository(TransportDbContext dbContext) : base(dbContext) { }
public UserRepository(TransportDbContext dbContext) : base(dbContext) { }
public RouteServices(TransportDbContext context, ILocationServices locationServices) { _context = context; _locationServices = locationServices; }
public CarDirectoryRepository(TransportDbContext dbContext) : base(dbContext) { }
public VehicleBrandServices(TransportDbContext context) { _context = context; }
public BookedCarsRepository(TransportDbContext dbContext) : base(dbContext) { }
public VehicleEntryRepository(TransportDbContext dbContext) { _dbContext = dbContext; }
public VehicleServices(TransportDbContext context, ITransInfoServices transInfoServices) { _context = context; _transInfoServices = transInfoServices; }
public LocationServices(TransportDbContext context) { _context = context; }
public UserServices(TransportDbContext context, UserManager <AppIdentityUser> userManager) { _context = context; _userManager = userManager; }
public Repository(TransportDbContext dbContext) { this.dbContext = dbContext; _dbSet = dbContext.Set <TEntity>(); }
public UserManagementRepository(TransportDbContext dbContext) { _dbContext = dbContext; }
public VehicleEntryController(TransportDbContext dbContext) { _vehicleEntryRepository = new VehicleEntryRepository(dbContext); }