Reputation: 322
I want to use ||
in this example:
(from p in DbContext.Posts where p.Name == str || where p.Category == str
select new PostResponse(){
//some properties here
})
but it gives me an error. Any way how I can achieve this?
Upvotes: 0
Views: 39
Reputation: 106
Just remove the second where
.
from p in DbContext.Posts where p.Name == str || p.Category == str
Upvotes: 3