public PhotoController(CarToGoDataContext _context, PhotoAppService PhotoAppService) { _baseDatos = _context; _photoAppService = PhotoAppService; if (_baseDatos.Photos.Count() == 0) { _baseDatos.Photos.Add(new Photo { Front = "Foto de Frente" }); _baseDatos.SaveChanges(); } }
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 StatusController(CarToGoDataContext _context, StatusAppService StatusAppService) { _baseDatos = _context; _statusAppService = StatusAppService; if (_baseDatos.Statuses.Count() == 0) { _baseDatos.Statuses.Add(new Status { Name = "Disponible" }); _baseDatos.SaveChanges(); } }
public ConditionController(CarToGoDataContext _context, ConditionAppService ConditionAppService) { _baseDatos = _context; _conditionAppService = ConditionAppService; if (_baseDatos.Conditions.Count() == 0) { _baseDatos.Conditions.Add(new Condition { Name = "Usado" }); _baseDatos.SaveChanges(); } }
public BrandController(CarToGoDataContext _context, BrandAppService BrandAppService) { _baseDatos = _context; _brandAppService = BrandAppService; if (_baseDatos.Brands.Count() == 0) { _baseDatos.Brands.Add(new Brand { Name = "Hyundai" }); _baseDatos.SaveChanges(); } }
public SellerController(CarToGoDataContext _context, SellerAppService SellerAppService) { _baseDatos = _context; _sellerAppService = SellerAppService; if (_baseDatos.Sellers.Count() == 0) { _baseDatos.Sellers.Add(new Seller { Name = "Daniel Rodriguez" }); _baseDatos.SaveChanges(); } }
public ModelController(CarToGoDataContext _context, ModelAppService modelAppService) { _dataBase = _context; _modelAppService = modelAppService; if (_dataBase.Models.Count() == 0) { _dataBase.Models.Add(new Model { Name = "Creta", BrandId = 1 }); _dataBase.SaveChanges(); } }
public ConditionAppService(CarToGoDataContext _context, ConditionDomainService conditionDomainService) { _baseDatos = _context; _conditionDomainService = conditionDomainService; }
public BrandAppService(CarToGoDataContext _context, BrandDomainService brandDomainService) { _baseDatos = _context; _brandDomainService = brandDomainService; }
public PhotoAppService(CarToGoDataContext _context, PhotoDomainService photoDomainService) { _baseDatos = _context; _photoDomainService = photoDomainService; }
public SellerAppService(CarToGoDataContext _context, SellerDomainService sellerDomainService) { _baseDatos = _context; _sellerDomainService = sellerDomainService; }
public ModelAppService(CarToGoDataContext _context, ModelDomainService modelDomainService) { _dataBase = _context; _modelDomainService = modelDomainService; }
public StatusAppService(CarToGoDataContext _context, StatusDomainService statusDomainService) { _baseDatos = _context; _statusDomainService = statusDomainService; }
public CarAppService(CarToGoDataContext _context, CarDomainService carDomainService) { _dataBase = _context; _carDomainService = carDomainService; }