public Equipments DeductEquipment(int equipmentId, int numberOfEquipment) { Equipments equipment = _equipmentRepository.FindById(equipmentId); equipment.EquipmentNumber -= numberOfEquipment; _equipmentRepository.UpdateEquipments(equipment); return(equipment); }
public void UpdateProductInfo(Equipment updatedProduct) { string id = updatedProduct.Id; Equipment product = _equipmentRepository.FindById(id); // product.ProductName = updatedProduct.ProductName; product.Category = updatedProduct.Category; product.Price = updatedProduct.Price; product.Description = updatedProduct.Description; product.Image = updatedProduct.Image; product.Gender = updatedProduct.Gender; product.Quantity = updatedProduct.Quantity; _equipmentRepository.Update(product); }