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