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); }
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); }