Пример #1
0
        public List <DeviceDto> GetSearchResult([FromBody] QueryInfo query)
        {
            var allDevices = _deviceRepository.GetAll().Include(x => x.DeviceType);

            var result = query.GetQuery(query, allDevices).ToList();

            var dtoResult = ObjectMapper.Map <List <DeviceDto> >(result);

            return(dtoResult);
        }
Пример #2
0
        public List <CoreEntityDto> CreateSearchResult([FromBody] QueryInfo query)
        {
            var allDevices = _repositoryEntity.GetAll() /*.Include(x => x.EntityType)*/;

            var result = query.GetQuery(query, allDevices).ToList();

            var dtoResult = ObjectMapper.Map <List <CoreEntityDto> >(result);

            return(dtoResult);
        }