i make a foreach in my table and gnerate an OR || statement with the list of USERSID?
I don't quite understand what you mean here. Can you describe it in detail? Or you can provide some necessary code and the error you encountered.
Best Regards,
YihuiSun
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
327 Points
1770 Posts
How to write a foreach in my Where for OR ||
Dec 22, 2020 02:29 PM|grafic.web|LINK
I,
i have a table called Advertises
and i need to shwo only the records which contains in my UserPartners Table the same UserId and PArtnerId
i try this but does not work
how can i make a foreach in my table and gnerate an OR || statement with the list of USERSID?
Contributor
2390 Points
687 Posts
Re: How to write a foreach in my Where for OR ||
Dec 23, 2020 09:12 AM|YihuiSun|LINK
Hi grafic.web,
Do you mean you did not get the correct result?
I don't quite understand what you mean here. Can you describe it in detail? Or you can provide some necessary code and the error you encountered.
Best Regards,
YihuiSun
Member
327 Points
1770 Posts
Re: How to write a foreach in my Where for OR ||
Dec 23, 2020 11:11 AM|grafic.web|LINK
yes it is not really clear..
i was wondering if i can to a foreac inside my Where. statement
and polulate my OR string
thanks
All-Star
57864 Points
15500 Posts
Re: How to write a foreach in my Where for OR ||
Dec 23, 2020 04:30 PM|bruce (sqlwork.com)|LINK
linq is set operations, there i no need for a foreach operator. you use the where clause to filter.