I have the following generic repository function but am unable to pass a parameter for order by
Task<List<T>> AdvGetAllAsync(
Expression<Func<T, bool>> expression = null,
Func<IQueryable<T>, IOrderedQueryable<T>> orderBy = null,
List<string> includes = null
);
Probably in this way:
var result = await someRep.AdvGetAllAsync(orderBy: q => q.OrderBy(x => x.SomeField));