public InventoryItem GetInventoryItem(int ID)
 {
     using (var context = new SBContext())
     {
         return(context.InventoryItems.Find(ID));
     }
 }
 public void SaveInventoryItem(InventoryItem inventoryItem)
 {
     using (var context = new SBContext())
     {
         context.InventoryItems.Add(inventoryItem);
         context.SaveChanges();
     }
 }
 public IQueryable <InventoryItem> GetInventoryItems()
 {
     using (var context = new SBContext())
     {
         var items = context.InventoryItems.ToList();
         return(items.AsQueryable());
     }
 }
        public InventoryItem DeleteInventoryItem(int ID)
        {
            using (var context = new SBContext())
            {
                var item = context.InventoryItems.Find(ID);
                context.InventoryItems.Remove(item);
                context.SaveChanges();

                return(item);
            }
        }
 public ServiceRepository(SBContext context)
 {
     this.db = context;
 }
Example #6
0
 public WorkingHourRepository(SBContext context)
 {
     this.db = context;
 }
Example #7
0
 public UserRepository(SBContext context)
 {
     this.db = context;
 }
Example #8
0
 public PedidoRP(SBContext context, CarrinhoCompra carrinho)
 {
     _context  = context;
     _carrinho = carrinho;
 }
 public CategoriaRP(SBContext contexto)
 {
     _context = contexto;
 }
Example #10
0
 public CustomerNotificationRepository(SBContext context)
 {
     this.db = context;
 }
Example #11
0
 public TeamNotificationRepository(SBContext context)
 {
     this.db = context;
 }
Example #12
0
 public CurrencyRepository(SBContext context)
 {
     this.db = context;
 }
Example #13
0
 public KlientsController(SBContext context)
 {
     _context = context;
 }
Example #14
0
 public CountryRepository(SBContext context)
 {
     this.db = context;
 }
Example #15
0
 public PermissionRepository(SBContext context)
 {
     this.db = context;
 }
Example #16
0
 public CarrinhoCompra(SBContext context)
 {
     _context = context;
 }
Example #17
0
 public BusinessRepository(SBContext context)
 {
     this.db = context;
 }
Example #18
0
 public DalUnitOfWork()
 {
     db = new SBContext("SBContext");
 }
Example #19
0
 public ClientRepository(SBContext context)
 {
     this.db = context;
 }
Example #20
0
 public SlotRepository(SBContext context)
 {
     this.db = context;
 }
 public ProdutoRP(SBContext contexto)
 {
     _context = contexto;
 }
Example #22
0
 public Time_ZoneRepository(SBContext context)
 {
     this.db = context;
 }
Example #23
0
 public CalendarSettingRepository(SBContext context)
 {
     this.db = context;
 }
Example #24
0
 public BookingRepository(SBContext context)
 {
     this.db = context;
 }
 public PozyczkisController(SBContext context)
 {
     _context = context;
 }
Example #26
0
 public WorkingBreakRepository(SBContext context)
 {
     this.db = context;
 }
Example #27
0
 public PageLangRepository(SBContext context)
 {
     this.db = context;
 }
Example #28
0
 public EmployeeRepository(SBContext context)
 {
     this.db = context;
 }
 public CarrinhoCompraItemRP(SBContext context)
 {
     _context = context;
 }