c# - Not in clause two list<> objects -


i trying create query :

select * subjects subjectid not in ( select subjectid results) 

for have object querying results table

 var _results =       new list<c_miscobjects.obj_results>();  _results = _enrollment.getresultview(convert.toint16(lblsid.text), lblcourseid.text); 

second object under

list<coursesdetail> _cd = _enrollment.getsubjects(lblcourseid.text); 

now want filter records of _cd in _results. i.e.

! _cd.subjectid.contains( _results.subjectid) 

you want :

 _cd.where(c => !_results.select(r => r.subjectid).contains(c.subjectid)) 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -