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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -