I am trying to filter a LINQ query, but it’s not accepting my where clause and I have no idea what kind of Lambda function to use.
This is what I want, but this throws an error.
var query = from s in _db.Students where s.Payments == null orderby s.LastName select s;
Assuming that
Paymentsis not a field ofStudents, but rather a property representing a collection ofPaymentitems related to thisStudent, try this query instead: