public SModels.StoreInventory ParseStoreInventory(Entities.StoreInventory storeInventory) { return(new SModels.StoreInventory { StoreInventoryID = storeInventory.StoreInventoryId, Store = ParseStore(storeInventory.Store), Product = ParseProduct(storeInventory.Product), InventoryQuantity = storeInventory.InventoryQuantity }); }
public void updateStoreInventory(StoreInventory storeInventory) { Entity.StoreInventory oldInventory = _context.StoreInventories.Find(storeInventory.StoreInventoryID); _context.Entry(oldInventory).CurrentValues.SetValues(_mapper.ParseStoreInventory(storeInventory)); _context.SaveChanges(); }