Exemplo n.º 1
0
        public async Task <List <SensorEventResponseModel> > GetAllEvents()
        {
            var response = _sensorEventRespository.GetAll();

            return(await response.ProjectTo <SensorEventResponseModel>(_mapper.ConfigurationProvider)
                   .ToListAsync());
        }
        public async Task <IEnumerable <SensorEventDto> > GetAll()
        {
            var events = await _sensorEventRepository.GetAll();

            return(_mapper.Map <IEnumerable <SensorEventDto> >(events.OrderBy(x => x.Timestamp)));
        }