'Use or in entity framework
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?
Solution 1:[1]
Just remove the second where.
from p in DbContext.Posts where p.Name == str || p.Category == str
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | POBIX |
