Wyobraź sobie, że funkcja jest podobna, a masz identyfikator nieruchomości w klasie ucznia.
public static class Helper {
public static void Test(Func<IQueryable<Student>, IOrderedQueryable<Student>> param)
{
var test = 0;
}
}
następnie można go używać w ten sposób
var student = new List<Student>().AsQueryable();//non sense, just for example
Helper.Test(m => student.OrderBy(x => x.Id));
m => student.OrderBy(x => x.Id)
jest
Func<IQueryable<Student>, IOrderedQueryable<Student>>
(IQueryable<student>
jako parametru Zwracanie IOrderedQueryable<Student>
)
lub po prostu
Helper.Test(m => m.OrderBy(x => x.Id));
W rzeczywistości to nie ma sensu bez funkcji „prawdziwego” ...
Chcesz nam powiedzieć, które działają, aby łatwiej wytłumaczyć? – AakashM