0
I have a column that will receive the orderBy
dynamically, by example:
_context.Tabela
.Where(p =>
p.colunaA.Contains(searchBy) ||
p.colunaB.Contains(searchBy) ||
p.colunaC.Contains(searchBy) ||
p.colunaD.Contains(searchBy)
)
.OrderByDescending(p => p.colunaA)
how to place this column p => p.colunaA
dynamic? Can be columns A, B,C or D. I tested several forms and could not reach a SelectedColumn
.
How many columns are there? how do you define which column is to be sorted? has how to explain it better?
– novic