I am learning how to use DataTables with my Razor Pages. I am getting an error with my .OrderBy

I am learning how to use DataTables with my Razor Pages. I am getting an error with my .OrderBy

Ryan DraytonRyan Drayton Posts: 2Questions: 2Answers: 0

: customerQuery = customerQuery.OrderBy($"{sortColumnName} {sortDirection}");

Severity Code Description Project File Line Suppression State
Error CS0411 The type arguments for method 'Queryable.OrderBy<TSource, TKey>(IQueryable<TSource>, Expression<Func<TSource, TKey>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Can someone please help me understand this issue?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,177Questions: 1Answers: 2,590
    Answer ✓

    Is this a DataTables issue? It seems like the problem is the query to the database. If so, it would be worth asking on StackOverflow or another appropriate forum.

    Colin

Sign In or Register to comment.