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
Post a Comment