The type arguments for method cannot be inferred from usage error
问题 I have a generic method for paging which I am trying to invoke. But I am getting a compile time error: The type arguments for method cannot be inferred from usage Method: public static IQueryable<T> OrderedPagedResults<T, TResult, TType>(IQueryable<T> query, int pageNum, int pageSize, Expression<Func<T, TResult>> orderByProperty, bool isAscendingOrder, out int rowsCount, List<KeyValuePair<Expression<Func<T, TType>>, bool>> lstThenByConditions = null) { if (pageSize <= 0) pageSize = 20;