public static IEnumerable <InOutLineMvoStateDto> ToInOutLineMvoStateDtoCollection(IEnumerable <InOutLineId> ids) { var states = new List <InOutLineMvoStateDto>(); foreach (var id in ids) { var dto = new InOutLineMvoStateDto(); dto.InOutLineId = new InOutLineIdDto(id); states.Add(dto); } return(states); }
public InOutLineMvoStateDto Get(string id, string fields = null) { try { var idObj = InOutLineMvosControllerUtils.ParseIdString(id); var state = (InOutLineMvoState)_inOutLineMvoApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new InOutLineMvoStateDto(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = InOutLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public static CreateInOutLineMvoDto ToCreateInOutLineMvo(this InOutLineMvoStateDto state) { return(state.ToCreateInOutLineMvo <CreateInOutLineMvoDto>()); }
public static MergePatchInOutLineMvoDto ToMergePatchInOutLineMvo(this InOutLineMvoStateDto state) { return(state.ToMergePatchInOutLineMvo <MergePatchInOutLineMvoDto>()); }
public static DeleteInOutLineMvoDto ToDeleteInOutLineMvo(this InOutLineMvoStateDto state) { return(state.ToDeleteInOutLineMvo <DeleteInOutLineMvoDto>()); }
public static IInOutLineMvoCommand ToCreateOrMergePatchInOutLineMvo(this InOutLineMvoStateDto state) { return(state.ToCreateOrMergePatchInOutLineMvo <CreateInOutLineMvoDto, MergePatchInOutLineMvoDto>()); }