public carEditModel(IVehicleTypeRepository _vehicleTypeRepo, ICarRepository _carRepo, IBrandRepository _brandRepo, LendCarDBContext Context, IBrandModelRepository _brandModelRepo, IWebHostEnvironment _hostEnvironment, UserManager <ApplicationUser> _userManager ) { vehicleTypeRepo = _vehicleTypeRepo; carRepo = _carRepo; brandRepo = _brandRepo; brandModelRepo = _brandModelRepo; _context = Context; hostEnvironment = _hostEnvironment; userManager = _userManager; VehicleTypes = new SelectList(vehicleTypeRepo.GetAllVehicleTypes().OrderBy(vt => vt.Type), "Id", "Type"); Brands = new SelectList(brandRepo.GetAllBrands().OrderBy(b => b.Name), "Id", "Name"); OdoMeters = new SelectList(carRepo.Context.OdoMeters.ToList(), "Id", "Value"); Colors = new SelectList(carRepo.Context.Colors.OrderBy(c => c.Name).ToList(), "Id", "Name"); Vehicle = new Vehicle(); Cities = new SelectList(carRepo.Context.Cities.OrderBy(c => c.Name).ToList(), "Id", "Name"); Today = DateTime.Now.Date; }
public ClientRepository(LendCarDBContext context, ICarRepository carRepository, IUserRepository userRepository) { Context = context; CarRepository = carRepository; UserRepository = userRepository; }
public RegisterModel( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, ILogger <RegisterModel> logger, LendCarDBContext Context, RoleManager <IdentityRole> roleManager, IWebHostEnvironment hostEnvironment ) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _context = Context; _roleManager = roleManager; _hostEnvironment = hostEnvironment; Cities = new SelectList(_context.Cities.OrderBy(c => c.Name).ToList(), "Id", "Name"); Genders = new SelectList(_context.Genders.ToList(), "Id", "Type"); }
public CarRepository(LendCarDBContext Context) { this.Context = Context; }
public BrandRepository(LendCarDBContext context) { this.Context = context; }
public VehicleTypeRepository(LendCarDBContext context) { this.Context = context; }
public ColorRepository(LendCarDBContext context) { this.Context = context; }
public ContactRepository(LendCarDBContext context) { Context = context; }
public PersonRepository(LendCarDBContext Context) { this.Context = Context; }
public CityRepostiory(LendCarDBContext context) { Context = context; }