public void Patch(string id, [FromBody] MergePatchInventoryItemEntryMvoDto value) { try { InventoryItemEntryMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _inventoryItemEntryMvoApplicationService.When(value as IMergePatchInventoryItemEntryMvo); } catch (Exception ex) { var response = InventoryItemEntryMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchInventoryItemEntryMvoDto c) { var idObj = InventoryItemEntryMvoProxyUtils.ToIdString((c as IMergePatchInventoryItemEntryMvo).InventoryItemEntryId); var uriParameters = new InventoryItemEntryMvoUriParameters(); uriParameters.Id = idObj; var req = new InventoryItemEntryMvoPatchRequest(uriParameters, (MergePatchInventoryItemEntryMvoDto)c); var resp = await _ramlClient.InventoryItemEntryMvo.Patch(req); InventoryItemEntryMvoProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchInventoryItemEntryMvoDto c) { WhenAsync(c).GetAwaiter().GetResult(); }