コード例 #1
0
        public void SetSupplements(IEnumerable <Supplement> supplements)
        {
            var supplementRepository = new SupplementRepository();

            foreach (var supplement in supplements)
            {
                supplementRepository.SetSupplement(supplement);
            }
        }
コード例 #2
0
 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);
 }
コード例 #3
0
        public Supplement GetSupplementById(int id)
        {
            var supplementRepository = new SupplementRepository();

            return(supplementRepository.GetSupplementById(id));
        }
コード例 #4
0
        public IEnumerable <Supplement> GetSupplementsByType(string type)
        {
            var supplementRepository = new SupplementRepository();

            return(supplementRepository.GetSupplementsByType(type));
        }
コード例 #5
0
        public IEnumerable <Supplement> GetSupplements()
        {
            var supplementRepository = new SupplementRepository();

            return(supplementRepository.GetSupplements());
        }
コード例 #6
0
 public SupplementsServices(SupplementRepository supplementRepository)
 {
     this.supplementRepository = supplementRepository;
 }