public void Patch(string id, [FromBody] MergePatchShipmentTypeDto value) { try { ShipmentTypesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _shipmentTypeApplicationService.When(value as IMergePatchShipmentType); } catch (Exception ex) { var response = ShipmentTypesControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchShipmentTypeDto c) { var idObj = (c as IMergePatchShipmentType).ShipmentTypeId; var uriParameters = new ShipmentTypeUriParameters(); uriParameters.Id = idObj; var req = new ShipmentTypePatchRequest(uriParameters, (MergePatchShipmentTypeDto)c); var resp = await _ramlClient.ShipmentType.Patch(req); ShipmentTypeProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchShipmentTypeDto c) { WhenAsync(c).GetAwaiter().GetResult(); }