public static IEnumerable <IOrderItemShipGroupAssociationMvoStateDto> ToOrderItemShipGroupAssociationMvoStateDtoCollection(IEnumerable <OrderItemShipGroupAssociationId> ids)
        {
            var states = new List <IOrderItemShipGroupAssociationMvoStateDto>();

            foreach (var id in ids)
            {
                var dto = new OrderItemShipGroupAssociationMvoStateDtoWrapper();
                dto.OrderItemShipGroupAssociationId = id;
                states.Add(dto);
            }
            return(states);
        }
 public IOrderItemShipGroupAssociationMvoStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = OrderItemShipGroupAssociationMvosControllerUtils.ParseIdString(id);
         var state = _orderItemShipGroupAssociationMvoApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new OrderItemShipGroupAssociationMvoStateDtoWrapper(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = OrderItemShipGroupAssociationMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Exemple #3
0
 public static MergePatchOrderItemShipGroupAssociationMvoDto ToMergePatchOrderItemShipGroupAssociationMvo(this OrderItemShipGroupAssociationMvoStateDtoWrapper state)
 {
     return(state.ToMergePatchOrderItemShipGroupAssociationMvo <MergePatchOrderItemShipGroupAssociationMvoDto>());
 }
Exemple #4
0
 public static CreateOrderItemShipGroupAssociationMvoDto ToCreateOrderItemShipGroupAssociationMvo(this OrderItemShipGroupAssociationMvoStateDtoWrapper state)
 {
     return(state.ToCreateOrderItemShipGroupAssociationMvo <CreateOrderItemShipGroupAssociationMvoDto>());
 }
Exemple #5
0
 public static IOrderItemShipGroupAssociationMvoCommand ToCreateOrMergePatchOrderItemShipGroupAssociationMvo(this OrderItemShipGroupAssociationMvoStateDtoWrapper state)
 {
     return(state.ToCreateOrMergePatchOrderItemShipGroupAssociationMvo <CreateOrderItemShipGroupAssociationMvoDto, MergePatchOrderItemShipGroupAssociationMvoDto>());
 }