How to work with OR condition using lamda expression

Total Post:19

Points:135
 641  View(s)
Ratings:
Rate this:

How to work with OR condition using lamda expression

I am using this code 

model = model.Where((x => x.ParentId == true )||(x => x.ParentName == true))

Its not working it shows error that operator || cannot be applied to operands of type lambda expression and lamda expression

 

  1. Post:45

    Points:323
    Re: How to work with OR condition using lamda expression

    Try  this I hope this will helps you

    model = model.Where((x => (x. ParentId == true) || (x. ParentName
    == true))

      Modified On Apr-11-2018 11:06:49 PM

Answer