public void Patch(string id, [FromBody] MergePatchGoodIdentificationTypeDto value) { try { GoodIdentificationTypesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _goodIdentificationTypeApplicationService.When(value as IMergePatchGoodIdentificationType); } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchGoodIdentificationTypeDto c) { var idObj = (c as IMergePatchGoodIdentificationType).GoodIdentificationTypeId; var uriParameters = new GoodIdentificationTypeUriParameters(); uriParameters.Id = idObj; var req = new GoodIdentificationTypePatchRequest(uriParameters, (MergePatchGoodIdentificationTypeDto)c); var resp = await _ramlClient.GoodIdentificationType.Patch(req); GoodIdentificationTypeProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchGoodIdentificationTypeDto c) { WhenAsync(c).GetAwaiter().GetResult(); }