Where clause in LINQ Query with Entity Framework -
i trying filter linq query, it's not accepting clause , have no idea kind of lambda function use.
this want, throws error.
var query = s in _db.students s.payments == null orderby s.lastname select s;
assuming payments not field of students, rather property representing collection of payment items related student, try query instead:
var query = s in _db.students !s.payments.any() orderby s.lastname select s;
Comments
Post a Comment