public IHttpActionResult FetchEssentialData(Guid?processInstanceId = null) { ParameterEssentialDataDto dto = new ParameterEssentialDataDto(); dto.AlarmList = _alarmService.Fetch <Alarm>(null, null, null).Select(e => Mapper.Map <Alarm, AlarmDetailDto>(e)).ToList(); dto.DeviceList = _deviceService.FetchWithoutProcessInstanceId(processInstanceId, null, null).Select(e => Mapper.Map <Device, DeviceDetailDto>(e)).ToList(); dto.FrequencyTypeList = Enum.GetValues(typeof(FrequencyType)) .Cast <FrequencyType>() .Select(item => new ItemDto <FrequencyType?> { Description = item.GetDescription(), Text = item.ToString(), Id = item }).ToList(); return(Ok(dto)); }