LINQ: orderby with dynamic string parameter
- by Luca Romagnoli
HI, i want to do this:
orderby = "Nome, Cognome desc";
var timb = time.Timbratures.Include("Anagrafica_Dipendente").Where(p => p.CodDipendente == 1);
if(orderBy != "")
timb = timb.OrderBy(orderBy);
Is there any method for pass a string parameter to Orderby
thanks