public void Patch(string id, [FromBody] MergePatchGoodIdentificationMvoDto value) { try { GoodIdentificationMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _goodIdentificationMvoApplicationService.When(value as IMergePatchGoodIdentificationMvo); } catch (Exception ex) { var response = GoodIdentificationMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchGoodIdentificationMvoDto c) { var idObj = GoodIdentificationMvoProxyUtils.ToIdString((c as IMergePatchGoodIdentificationMvo).ProductGoodIdentificationId); var uriParameters = new GoodIdentificationMvoUriParameters(); uriParameters.Id = idObj; var req = new GoodIdentificationMvoPatchRequest(uriParameters, (MergePatchGoodIdentificationMvoDto)c); var resp = await _ramlClient.GoodIdentificationMvo.Patch(req); GoodIdentificationMvoProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchGoodIdentificationMvoDto c) { WhenAsync(c).GetAwaiter().GetResult(); }