public HttpResponseMessage Post([FromBody] CreateOrderItemShipGroupAssociationMvoDto value) { try { if (value.OrderItemShipGroupAssociationId == default(OrderItemShipGroupAssociationId)) { throw DomainError.Named("nullId", "Aggregate Id in cmd is null, aggregate name: {0}.", "OrderItemShipGroupAssociationMvo"); } _orderItemShipGroupAssociationMvoApplicationService.When(value as ICreateOrderItemShipGroupAssociationMvo); var idObj = value.OrderItemShipGroupAssociationId; return(Request.CreateResponse <OrderItemShipGroupAssociationId>(HttpStatusCode.Created, idObj)); } catch (Exception ex) { var response = OrderItemShipGroupAssociationMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(CreateOrderItemShipGroupAssociationMvoDto c) { var idObj = OrderItemShipGroupAssociationMvoProxyUtils.ToIdString((c as ICreateOrderItemShipGroupAssociationMvo).OrderItemShipGroupAssociationId); var uriParameters = new OrderItemShipGroupAssociationMvoUriParameters(); uriParameters.Id = idObj; var req = new OrderItemShipGroupAssociationMvoPutRequest(uriParameters, (CreateOrderItemShipGroupAssociationMvoDto)c); var resp = await _ramlClient.OrderItemShipGroupAssociationMvo.Put(req); OrderItemShipGroupAssociationMvoProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(CreateOrderItemShipGroupAssociationMvoDto c) { WhenAsync(c).GetAwaiter().GetResult(); }