Пример #1
0
 public void Patch(string id, [FromBody] MergePatchLocatorTypeDto value)
 {
     try {
         LocatorTypesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _locatorTypeApplicationService.When(value as IMergePatchLocatorType);
     } catch (Exception ex) { var response = LocatorTypesControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(MergePatchLocatorTypeDto c)
        {
            var idObj         = (c as IMergePatchLocatorType).LocatorTypeId;
            var uriParameters = new LocatorTypeUriParameters();

            uriParameters.Id = idObj;

            var req  = new LocatorTypePatchRequest(uriParameters, (MergePatchLocatorTypeDto)c);
            var resp = await _ramlClient.LocatorType.Patch(req);

            LocatorTypeProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(MergePatchLocatorTypeDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }