public IHttpActionResult PutUpdate(Guid id, InventoryItem item) { if (!ModelState.IsValid) return BadRequest(ModelState); if (id != item.Id) return BadRequest(); IList<ServiceError> errors = inventoryItemManagement.Update(item); return HandleErrors(errors); }
public IHttpActionResult PostAdd(InventoryItem item) { if (!ModelState.IsValid) return BadRequest(ModelState); item.InventoryId = InventoryId; inventoryItemManagement.Insert(item); return Ok(); }