c# - lambada expression how to express or? -
i want use lambada expression search status equals 1 or 2. code following:
return database.find<patient>(p=>(p.id==id && p.status ==1)||(p.id==id && p.status==2)); i know it's not right, understand want above code.
i use c#
update: sorry guys, realize not reason of syntax, it's reason of third party api use data db. please close question.
return database.find<patient>(p=>p.id==id && (p.status ==1 || p.status==2));
Comments
Post a Comment