public static IEnumerable <IGoodIdentificationMvoStateDto> ToGoodIdentificationMvoStateDtoCollection(IEnumerable <ProductGoodIdentificationId> ids)
        {
            var states = new List <IGoodIdentificationMvoStateDto>();

            foreach (var id in ids)
            {
                var dto = new GoodIdentificationMvoStateDtoWrapper();
                dto.ProductGoodIdentificationId = id;
                states.Add(dto);
            }
            return(states);
        }
 public IGoodIdentificationMvoStateDto Get(string id, string fields = null)
 {
     try {
         var idObj = GoodIdentificationMvosControllerUtils.ParseIdString(id);
         var state = _goodIdentificationMvoApplicationService.Get(idObj);
         if (state == null)
         {
             return(null);
         }
         var stateDto = new GoodIdentificationMvoStateDtoWrapper(state);
         if (String.IsNullOrWhiteSpace(fields))
         {
             stateDto.AllFieldsReturned = true;
         }
         else
         {
             stateDto.ReturnedFieldsString = fields;
         }
         return(stateDto);
     } catch (Exception ex) { var response = GoodIdentificationMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
예제 #3
0
 public static CreateGoodIdentificationMvoDto ToCreateGoodIdentificationMvo(this GoodIdentificationMvoStateDtoWrapper state)
 {
     return(state.ToCreateGoodIdentificationMvo <CreateGoodIdentificationMvoDto>());
 }
예제 #4
0
 public static MergePatchGoodIdentificationMvoDto ToMergePatchGoodIdentificationMvo(this GoodIdentificationMvoStateDtoWrapper state)
 {
     return(state.ToMergePatchGoodIdentificationMvo <MergePatchGoodIdentificationMvoDto>());
 }
예제 #5
0
 public static IGoodIdentificationMvoCommand ToCreateOrMergePatchGoodIdentificationMvo(this GoodIdentificationMvoStateDtoWrapper state)
 {
     return(state.ToCreateOrMergePatchGoodIdentificationMvo <CreateGoodIdentificationMvoDto, MergePatchGoodIdentificationMvoDto>());
 }