public OrderService(RequestContext c) { context = c; Orders = OrderRepository.InstantiateForDatabase(c); Taxes = TaxRepository.InstantiateForDatabase(c); TaxSchedules = TaxScheduleRepository.InstantiateForDatabase(c); ShippingZones = ZoneRepository.InstantiateForDatabase(c); Transactions = OrderTransactionRepository.InstantiateForDatabase(c); ShippingMethods = ShippingMethodRepository.InstantiateForDatabase(c); }
public ExcursionController() { this.zoneRepository = new ZoneRepository(new ExcursionContext()); this.excursionRepository = new ExcursionRepository(new ExcursionContext()); this.userRepository = new UserRepository(new ExcursionContext()); this.periodeRepository = new PeriodeRepository(new ExcursionContext()); this.prixRepository = new PrixRepository(new ExcursionContext()); this.excursionThemeRepository = new ExcursionThemeRepository(new ExcursionContext()); this.themeRepository = new ThemeRepository(new ExcursionContext()); }
static public Zone GetZoneBypliote(Pilote pilote) { Zone zonetemp = null; using (ZoneRepository zonerepo = new ZoneRepository()) { zonetemp = zonerepo.GetSingleByPilote(pilote); } return(zonetemp); }
static public Zone GetZone(int zoneid) { Zone zonetemp = null; using (ZoneRepository zonerepo = new ZoneRepository()) { zonetemp = zonerepo.GetSingle(zoneid); } return(zonetemp); }
static public Zone GetZoneByName(string zonename) { Zone zonetemp = null; using (ZoneRepository zonerepo = new ZoneRepository()) { zonetemp = zonerepo.GetSingleByName(zonename); } return(zonetemp); }
public static OrderService InstantiateForDatabase(RequestContext c) { return(new OrderService(c, OrderRepository.InstantiateForDatabase(c), TaxRepository.InstantiateForDatabase(c), TaxScheduleRepository.InstantiateForDatabase(c), ZoneRepository.InstantiateForDatabase(c), OrderTransactionRepository.InstantiateForDatabase(c), ShippingMethodRepository.InstantiateForDatabase(c), Accounts.StoreSettingsRepository.InstantiateForDatabase(c))); }
public OrderService(HccRequestContext c, OrderRepository orders, TaxRepository taxes, TaxScheduleRepository taxSchedules, ZoneRepository shippingZones, OrderTransactionRepository transactions, ShippingMethodRepository shippingMethods, StoreSettingsRepository settings, RMARepository returnsRepo) : this(c) { }
static public Zone GetZonedetached(int zoneid) { Zone zonetemp = null; using (ZoneRepository zonerepo = new ZoneRepository()) { zonetemp = zonerepo.GetSingle(zoneid); zonerepo.context.Entry(zonetemp).State = EntityState.Detached; } return(zonetemp); }
static public void addzone(Zone zone) { using (ZoneRepository zonerepo = new ZoneRepository()) { zonerepo.context.Entry(zone.PiloteZoneObli).State = EntityState.Unchanged; if (zone.PiloteZoneOpti != null) { zonerepo.context.Entry(zone.PiloteZoneOpti).State = EntityState.Unchanged; } zonerepo.Add(zone); zonerepo.Save(); } }
public List <FrayteZone> GetZoneList(int OperationZoneId, string LogisticType, string CourierCompany, string RateType, string ModuleType) { List <FrayteZone> list = new List <FrayteZone>(); if (!string.IsNullOrEmpty(LogisticType) && !string.IsNullOrEmpty(RateType)) { list = new ZoneRepository().GetZoneDetail(OperationZoneId, LogisticType, CourierCompany, RateType, ModuleType); } else { list = new ZoneRepository().GetZoneDetail(OperationZoneId, CourierCompany, ModuleType); } return(list); }
static public List <Zone> GetAllZones() { List <Zone> zonetemp = null; using (ZoneRepository zonerepo = new ZoneRepository()) { zonetemp = (List <Zone>)zonerepo.GetAll(); foreach (Zone zone in zonetemp) { zonerepo.context.Entry(zone).State = EntityState.Detached; } } return(zonetemp); }
public OrderService(RequestContext c, OrderRepository orders, TaxRepository taxes, TaxScheduleRepository taxSchedules, ZoneRepository shippingZones, OrderTransactionRepository transactions, ShippingMethodRepository shippingMethods, Accounts.StoreSettingsRepository settings) { context = c; Orders = orders; Taxes = taxes; TaxSchedules = taxSchedules; ShippingZones = shippingZones; Transactions = transactions; ShippingMethods = shippingMethods; this.storeSettings = settings; }
public static BossesZoneModel ToModel(this BossesZoneEntity BZE) { if (BZE != null) { BossRepository repoBoss = new BossRepository(); ZoneRepository repoZone = new ZoneRepository(); BossesZoneModel BZM = new BossesZoneModel(); BZM.Boss = repoBoss.GetOne(BZE.BossId).MapTo <BossModel>(); BZM.Zone = repoZone.GetOne(BZE.ZoneId).MapTo <ZoneModel>(); BZM.Active = BZE.Active; BZM.Id = BZE.Id; return(BZM); } else { return(null); } }
public static TeamModel ToModel(this TeamEntity TE) { if (TE != null) { ZoneRepository repoZ = new ZoneRepository(); UserRepository repoU = new UserRepository(); CharactersConfigurationRepository repoCC = new CharactersConfigurationRepository(); TeamModel TM = new TeamModel(); TM.Id = TE.Id; TM.CharactersConfiguration = repoCC.GetOne(TE.CharactersConfigurationId).ToModel(); TM.TeamName = TE.TeamName; TM.Zone = repoZ.GetOne(TE.ZoneId).MapTo <ZoneModel>(); TM.User = repoU.GetOne(TE.UserId).MapTo <UserModel>(); TM.Active = TE.Active; return(TM); } else { return(null); } }
public ZoneManager(UnitOfWorkManager unitOfWorkManager) { ZoneRepository = new ZoneRepository(unitOfWorkManager.UnitOfWork); }
public ZoneController() { this.zoneRepository = new ZoneRepository(new ExcursionContext()); this.centreRepository = new CentreRepository(new ExcursionContext()); }
public RegionController() { this.regionRepository = new RegionRepository(new ExcursionContext()); this.zoneRepository = new ZoneRepository(new ExcursionContext()); }
public List <FrayteZone> ZoneListByOperationZone(int OperationZoneId) { var list = new ZoneRepository().GetZoneList(OperationZoneId); return(list); }
public List <FrayteZone> ZoneList() { var list = new ZoneRepository().GetZoneList(); return(list); }
public PrixController() { this.prixRepository = new PrixRepository(new ExcursionContext()); this.zonePrixRepository = new ZonePrixRepository(new ExcursionContext()); this.zoneRepository = new ZoneRepository(new ExcursionContext()); }
public ZoneController(ZoneRepository rep, IHostingEnvironment host) { zRepository = rep; this.host = host; }
public ZoneService(ZoneRepository ZoneRepository) { _ZoneRepositorý = ZoneRepository; }