示例#1
0
 public void Patch(string id, [FromBody] MergePatchDamageTypeDto value)
 {
     try {
         DamageTypesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _damageTypeApplicationService.When(value as IMergePatchDamageType);
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(MergePatchDamageTypeDto c)
        {
            var idObj         = (c as IMergePatchDamageType).DamageTypeId;
            var uriParameters = new DamageTypeUriParameters();

            uriParameters.Id = idObj;

            var req  = new DamageTypePatchRequest(uriParameters, (MergePatchDamageTypeDto)c);
            var resp = await _ramlClient.DamageType.Patch(req);

            DamageTypeProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(MergePatchDamageTypeDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }