0

我有以下通用存储库函数,但无法传递 order by

Task<List<T>> AdvGetAllAsync(
            Expression<Func<T, bool>> expression = null,
            Func<IQueryable<T>, IOrderedQueryable<T>> orderBy = null,
            List<string> includes = null
            );
4

1 回答 1

0

大概是这样的:

var result = await someRep.AdvGetAllAsync(orderBy: q => q.OrderBy(x => x.SomeField));
于 2022-01-25T15:50:49.373 回答