コード例 #1
0
        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); }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void When(CreateOrderItemShipGroupAssociationMvoDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }