c# - Lambda Except Placement -


i want return list of lans , want exclude userinformation.globals.lanid list.

code:

var lanlist = _context.corp_matrixpositionoldway                .where(x => x.childorglevel.startswith(parentorg.tostring()))                .select(x => x.childlan)                .except(userinformation.globals.lanid); 

error:

'iqueryable' not contain definition 'except'

i think want exclude single childlan, use where:

var lanlist = _context.corp_matrixpositionoldway            .where(x => x.childorglevel.startswith(parentorg.tostring()))            .select(x => x.childlan)            .where(lan => lan != userinformation.globals.lanid); 

Comments

Popular posts from this blog

python - Best design pattern for collection of objects -

go - serving up pdfs using golang -

python - django admin: changing the way a field (w/ relationship to another model) is submitted on a form so that it can be submitted multiple times -