c# - LINQ to entites, query on entity then except from a list (composite key) -


i query entity (inscriptionecole) few filters. entity has composite key (inscriptionecolekey, 7 properties).

in other side, have list of key (list).

my goal remove query tuples key present in list.

how can ?

thank

inscriptionecolekey :

  • fkanneeanneescolaire
  • fkcldegre
  • fkcllecole
  • fkcllformation
  • fkcllversion
  • fkelenumeleve
  • numins

example of query on inscriptionecole :

var ins = datacontext.inscriptionecole.where(     => i.fkanneannee == "20132014"       && i.fkcllecole == "cifom"       && i.valide == "o" ); 

can't filter so?

datacontext.inscriptionecole.where(item => !otherlist.contains(item, customcomparer)); 

see documentation contains here

update

what needed nonequi join:

datacontext.inscriptionecole.where(ecoleitem =>      !keys.any(key =>          key.fkelenumeleve == ecoleitem.fkelenumeleve &&         key.fkcllecole == ecoleitem.fkcllecole && ...)); 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -