public IHttpActionResult FetchProcessInstanceGeo() { //Recupero l'entity IList <ProcessInstance> entities = _processInstanceService.Fetch <ProcessInstance>(null, null, null); //Compongo il dto IList <GeolocationSwiftDto> dtos = entities.Select(e => Mapper.Map <GeolocationSwiftDto>(e)).ToList(); //Ritorno i risultati return(Ok(dtos)); }
public IHttpActionResult FetchEssentialData() { var processInstances = _processInstanceService.Fetch(string.Empty, null, null, null, ProcessInstanceState.Open, null, null); DeviceEssentialDataDto dto = new DeviceEssentialDataDto { ProcessInstanceList = processInstances.Select(e => Mapper.Map <ProcessInstanceIndexDto>(e)).ToList() }; return(Ok(dto)); }