Hi, i want to implement Full text search using your pagedresultdto. Following is the code i am using to get list of records. In this i want to implement Full text search.
public async Task<PagedResultDto<BuilderListDto>> getBuilders1(GetBuilderTrack1 input) { IQueryable<BuildersInformation> files; files = _buildersRepository .GetAll() //.Include(p => p.User) .WhereIf( !input.Filter.IsNullOrEmpty(), p => p.BuilderName.ToLower().Contains(input.Filter.ToLower()) //|| p.BuilderAddress.ToLower().Contains(input.Filter.ToLower()) ) //.WhereIf(!input.City.IsNullOrEmpty(), // p => p.CityFor.ToLower().Contains(input.City.ToLower())) .OrderBy(p => p.BuilderName).AsQueryable();
var userCount = await files.CountAsync();
var Files = await files
.OrderBy(input.Sorting)
.PageBy(input)
.ToListAsync();
var builderListDto = Files.MapTo<List<BuilderListDto>>();
return new PagedResultDto<BuilderListDto>(
userCount,
builderListDto
);
}
1 Answer(s)
-
0
explain your problem.
you may need to use custom repository for fulltext search. <a class="postlink" href="http://www.entityframework.info/Home/FullTextSearch">http://www.entityframework.info/Home/FullTextSearch</a>
it's a fulltextsearch with entity framework subject. <a class="postlink" href="https://stackoverflow.com/questions/11616304/entity-framework-code-first-and-full-text-search">https://stackoverflow.com/questions/116 ... ext-search</a>