EasyAbp / AbpHelper.CLI

Providing code generation and more features to help you develop applications and modules with the ABP framework.
MIT License
285 stars 95 forks source link

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

Closed naderjavid closed 1 year ago

gdlcf88 commented 2 years ago

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

blackWins commented 1 year ago

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);
    }
gdlcf88 commented 1 year ago

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