public void Patch(string id, [FromBody] MergePatchWarehouseDto value)
 {
     try {
         WarehousesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _warehouseApplicationService.When(value as IMergePatchWarehouse);
     } catch (Exception ex) { var response = WarehousesControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(MergePatchWarehouseDto c)
        {
            var idObj         = (c as IMergePatchWarehouse).WarehouseId;
            var uriParameters = new WarehouseUriParameters();

            uriParameters.Id = idObj;

            var req  = new WarehousePatchRequest(uriParameters, (MergePatchWarehouseDto)c);
            var resp = await _ramlClient.Warehouse.Patch(req);

            WarehouseProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(MergePatchWarehouseDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }