public void Delete(string id, string commandId, string version, string requesterId = default(string)) { try { var value = new DeleteOrderItemShipGrpInvReservationDto(); value.CommandId = commandId; value.RequesterId = requesterId; value.Version = (long)Convert.ChangeType(version, typeof(long)); OrderItemShipGrpInvReservationsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _orderItemShipGrpInvReservationApplicationService.When(value as IDeleteOrderItemShipGrpInvReservation); } catch (Exception ex) { var response = OrderItemShipGrpInvReservationsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(DeleteOrderItemShipGrpInvReservationDto c) { var idObj = OrderItemShipGrpInvReservationProxyUtils.ToIdString((c as IDeleteOrderItemShipGrpInvReservation).OrderItemShipGrpInvResId); var uriParameters = new OrderItemShipGrpInvReservationUriParameters(); uriParameters.Id = idObj; var q = new OrderItemShipGrpInvReservationDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.Version); var req = new OrderItemShipGrpInvReservationDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.OrderItemShipGrpInvReservation.Delete(req); OrderItemShipGrpInvReservationProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(DeleteOrderItemShipGrpInvReservationDto c) { WhenAsync(c).GetAwaiter().GetResult(); }