public async Task WhenAsync(CreateOrderShipGroupMvoDto c) { var idObj = OrderShipGroupMvoProxyUtils.ToIdString((c as ICreateOrderShipGroupMvo).OrderShipGroupId); var uriParameters = new OrderShipGroupMvoUriParameters(); uriParameters.Id = idObj; var req = new OrderShipGroupMvoPutRequest(uriParameters, (CreateOrderShipGroupMvoDto)c); var resp = await _ramlClient.OrderShipGroupMvo.Put(req); OrderShipGroupMvoProxyUtils.ThrowOnHttpResponseError(resp); }
public HttpResponseMessage Post([FromBody] CreateOrderShipGroupMvoDto value) { try { if (value.OrderShipGroupId == default(OrderShipGroupId)) { throw DomainError.Named("nullId", "Aggregate Id in cmd is null, aggregate name: {0}.", "OrderShipGroupMvo"); } _orderShipGroupMvoApplicationService.When(value as ICreateOrderShipGroupMvo); var idObj = value.OrderShipGroupId; return(Request.CreateResponse <OrderShipGroupId>(HttpStatusCode.Created, idObj)); } catch (Exception ex) { var response = OrderShipGroupMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public void When(CreateOrderShipGroupMvoDto c) { WhenAsync(c).GetAwaiter().GetResult(); }