AbpHelper.CLI icon indicating copy to clipboard operation
AbpHelper.CLI copied to clipboard

add filtering to ui & get entity list and totalCount at same time from repository

Open naderjavid opened this issue 2 years ago • 2 comments

naderjavid avatar Jun 17 '22 07:06 naderjavid

https://github.com/EasyAbp/AbpHelper.CLI/pull/178#discussion_r888298775

gdlcf88 avatar Jul 01 '22 07:07 gdlcf88

Hi: I think we should expose and override GetListAsync or CreateFilteredQueryAsync , and replace the default PagedAndSortedResultRequestDto to targetGetListInput . The framework provides these methods to make filtering easier and faster

Like this

    protected override async Task<IQueryable<GoodsType>> CreateFilteredQueryAsync(GoodsTypeGetListInput input)
    {
        // TODO: AbpHelper generated
        return (await base.CreateFilteredQueryAsync(input))
            //loop EntityInfo.Properties output filter conditions
            .WhereIf(input.DisplayName.IsNullOrWhiteSpace(), x => x.DisplayName == input.DisplayName);
    }

blackWins avatar Sep 29 '22 02:09 blackWins

Duplicate of https://github.com/EasyAbp/AbpHelper.CLI/pull/189

gdlcf88 avatar Oct 22 '22 10:10 gdlcf88