Пример #1
0
        public CarController(CarToGoDataContext _context, CarAppService carAppService)
        {
            _dataBase      = _context;
            _carAppService = carAppService;

            if (_dataBase.Cars.Count() == 0)
            {
                _dataBase.Cars.Add(new Car {
                    ModelId = 1, PhotoId = 1, Year = 2014, Color = "Black", StatusId = 1, SellerId = 1, ConditionId = 1
                });
                _dataBase.SaveChanges();
            }
        }
 public CarRentalsController(CarRentalAppService carRentalAppService, IUnitOfWork <Context> uow, CarAppService carAppService)
 {
     _carRentalAppService = carRentalAppService;
     _uow           = uow;
     _carAppService = carAppService;
 }