Beispiel #1
0
 public void Patch(string id, [FromBody] MergePatchFacilityDto value)
 {
     try {
         FacilitiesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _facilityApplicationService.When(value as IMergePatchFacility);
     } catch (Exception ex) { var response = FacilitiesControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(MergePatchFacilityDto c)
        {
            var idObj         = (c as IMergePatchFacility).FacilityId;
            var uriParameters = new FacilityUriParameters();

            uriParameters.Id = idObj;

            var req  = new FacilityPatchRequest(uriParameters, (MergePatchFacilityDto)c);
            var resp = await _ramlClient.Facility.Patch(req);

            FacilityProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(MergePatchFacilityDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }