public void SetSupplements(IEnumerable <Supplement> supplements) { var supplementRepository = new SupplementRepository(); foreach (var supplement in supplements) { supplementRepository.SetSupplement(supplement); } }
public UnitOfWork(ApplicationDbContext context) { this.context = context; Equipment = new EquipmentRepository(context); Areas = new Repository <Area>(context); Types = new Repository <Core.Domain.Type>(context); Supplements = new SupplementRepository(context); Flavors = new Repository <Flavor>(context); SupplementTypes = new Repository <SupplementType>(context); Malfunctions = new MalfunctionRepository(context); EquipmentOrders = new EquipmentOrderRepository(context); OrderStatuses = new Repository <OrderStatus>(context); Employees = new Repository <ApplicationUser>(context); }
public Supplement GetSupplementById(int id) { var supplementRepository = new SupplementRepository(); return(supplementRepository.GetSupplementById(id)); }
public IEnumerable <Supplement> GetSupplementsByType(string type) { var supplementRepository = new SupplementRepository(); return(supplementRepository.GetSupplementsByType(type)); }
public IEnumerable <Supplement> GetSupplements() { var supplementRepository = new SupplementRepository(); return(supplementRepository.GetSupplements()); }
public SupplementsServices(SupplementRepository supplementRepository) { this.supplementRepository = supplementRepository; }