public void Update(StorageEntity item) { using (var db = new InventaryContext()) { db.Storages.Update(item); db.SaveChanges(); } }
public static List <WerehouseEntity> WereHouseList() { using (var contexto = new InventaryContext()) { return(contexto.Werehouses.ToList()); } }
public static WerehouseEntity WereHouseById(string id) { using (var contexto = new InventaryContext()) { return(contexto.Werehouses.ToList().FirstOrDefault(wh => wh.WerehouseId == id)); } }
public static ProductEntity ProductById(string id) { using (var db = new InventaryContext()) { return(db.Products.ToList().LastOrDefault(p => p.ProductId == id)); } }
public static List <StorageEntity> StorageList() { using (var db = new InventaryContext()) { return(db.Storages.ToList()); } }
public static List <WarehouseEntity> WarehouseList() { using (var db = new InventaryContext()) { return(db.Warehouses.ToList()); } }
public static List <ProductEntity> ProductList() { using (var db = new InventaryContext()) { return(db.Products.ToList()); } }
public static IEnumerable <OrderEntity> OrderById(string id) { using (var db = new InventaryContext()) { return(db.Orders.ToList().Where(o => o.clientIdentifier == id)); // Products.ToList().LastOrDefault(p => p.productId == id); } }
public static List <OrderEntity> OrderList() { using (var db = new InventaryContext()) { return(db.Orders.ToList()); } }
public CategoryEntity FindElement(string id) { using (var db = new InventaryContext()) { return(db.Categories.ToList().LastOrDefault(p => p.CategoryId == id)); } }
public static WareHouseEntity WareHouseById(string id) { using (var db = new InventaryContext()) { return(db.WareHouses.ToList().LastOrDefault(p => p.WareHouseId == id)); } }
public static ProductEntity ProductById(string id) { using (var contexto = new InventaryContext()) { return(contexto.Products.FirstOrDefault(p => p.ProductId == id)); } }
public void CreateItem(StorageEntity item) { using (var db = new InventaryContext()) { db.Storages.Add(item); db.SaveChanges(); } }
public warehouseEntity GetWarehouseById(string id) { using (var db = new InventaryContext()) { return(db.Warehouses.ToList().LastOrDefault(x => x.WarehouseId == id)); } }
public static CategoryEntity CategoryById(string id) { using (var db = new InventaryContext()) { return(db.Categories.ToList().LastOrDefault(c => c.CategoryId == id)); } }
public void CreateItem(ProductEntity item) { using (var db = new InventaryContext()) { db.Products.Add(item); db.SaveChanges(); } }
public static List <CategoryEntity> CategoryList() { using (var db = new InventaryContext()) { return(db.Categories.ToList()); } }
// ----------> List public List <InputOutputEntity> InputOutputList() { using (var db = new InventaryContext()) { return(db.InOuts.ToList()); } }
public static List <StorageEntity> StorageProductsByWarehouseList(string idWarehouse) { using (var db = new InventaryContext()) { return(db.Storages.Include(x => x.Product).Include(x => x.Warehouse).Where(x => x.WarehouseId == idWarehouse).ToList()); } }
public static void UpdateProducts(ProductEntity uProduct) { using (var db = new InventaryContext()) { db.Products.Update(uProduct); db.SaveChanges(); } }
public void UpdateInOut(InOutEntity oInOut) { using (var db = new InventaryContext()) { db.InOuts.Update(oInOut); db.SaveChanges(); } }
public void Update(InputOutputEntity item) { using (var db = new InventaryContext()) { db.InOuts.Update(item); db.SaveChanges(); } }
public static void CreateProduct(ProductEntity oProduct) { using (var db = new InventaryContext()) { db.Products.Add(oProduct); db.SaveChanges(); } }
public void CreateCategory(InputOutputEntity oInOut) { using (var db = new InventaryContext()) { db.InOuts.Add(oInOut); db.SaveChanges(); } }
public void UpdateInOut(CategoryEntity uInOut) { using (var db = new InventaryContext()) { db.Categories.Update(uInOut); db.SaveChanges(); } }
public static void UpdateWarehouse(WarehouseEntity oWarehouse) { using (var db = new InventaryContext()) { db.Warehouses.Update(oWarehouse); db.SaveChanges(); } }
public static void CreateWareHouse(WareHouseEntity oWareHouse) { using (var db = new InventaryContext()) { db.WareHouses.Add(oWareHouse); db.SaveChanges(); } }
public static void StorageUpdate(StorageEntity storageEntity) { using (var contexto = new InventaryContext()) { contexto.Storages.Update(storageEntity); contexto.SaveChanges(); } }
public static void StorageInsert(StorageEntity storageEntity) { using (var contexto = new InventaryContext()) { contexto.Storages.Add(storageEntity); contexto.SaveChanges(); } }
public static void UpdateCategory(CategoryEntity oCategory) { using (var db = new InventaryContext()) { db.Categories.Update(oCategory); db.SaveChanges(); } }