Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Full Text search #3776


User avatar
0
huntethan89 created

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&lt;List&lt;BuilderListDto&gt;>();
        return new PagedResultDto&lt;BuilderListDto&gt;(
           userCount,
           builderListDto
           );
    }

1 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    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>