TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
nave
NA
9.5k
0
LINQ quary question
Jul 30 2013 2:44 PM
in my db i have a table with column (string) containing the ID (key) of another table.
column string content is in the form of > 1,2,3 exc...
lets say i nave table "TABLEA":
NAME FIELDS
john 1
bob 1,2
i'm passing the "itemFilter" quary in order to find all items in the table that column "FIELDS" match one or more ID's:
var itemFilter = "1";
query = query.Where(c => c.TABLEA.FIELDS.Contains(itemFilter));
"itemFilter" needs to bring back results for both john and bob but this is not working properly.
i belive this quary creates "AND" relation but i need to get an "OR" relation in order to get all items that match one or mote ID's in the array.
how do i do that?
Reply
Answers (
5
)
Automate OAuth2
CheckBoxList