public void Patch(string id, [FromBody] MergePatchDocumentTypeDto value) { try { DocumentTypesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _documentTypeApplicationService.When(value as IMergePatchDocumentType); } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchDocumentTypeDto c) { var idObj = (c as IMergePatchDocumentType).DocumentTypeId; var uriParameters = new DocumentTypeUriParameters(); uriParameters.Id = idObj; var req = new DocumentTypePatchRequest(uriParameters, (MergePatchDocumentTypeDto)c); var resp = await _ramlClient.DocumentType.Patch(req); DocumentTypeProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchDocumentTypeDto c) { WhenAsync(c).GetAwaiter().GetResult(); }