I have object with ID = 5, ID = 6 and List 1,5. Since list has 5 i need to have object with ID = 5 as a result, but if my list has 5 and 6 i need to have both objects as a result. Hope i'm clear enough.
So something like this:
result = result.Where(r=>r.ID ***IS IN LIST<int>***).OrderBy(r=>r.ID);
Any help is appreciated.
result = result.Where(r=>listOfId.Contains(r.ID)).OrderBy(r=>r.ID);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With