I am outputting a students logged problems by passing the student into the view and then accessing their problems like this:
foreach (var item in Model.Student.Problems) {
I was wandering how I could sort these items by the ProblemDateTime attribute? I notice when I put a . after Problems there is a OrderByDescending option by I am not entirely sure how to use it?
Any help would be appreciated.
Thanks,
Jon
I would tend to use a different ViewModel that consist of a Student and Problems as different properties
Then your Controller should be responsible for returning the Student and the correct Problems