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
Aniket Narvankar
558
2.1k
608.7k
How to construct an MongoDB Linq Any() query by comparing a sub-field
Apr 5 2021 7:47 AM
I need help on how to use linq Any with mongodb in c sharp
Following is the query I have written
builder.Where(d => d.DepartmentId == appSettings.ClientId && d.IsCompleted == 0 && d.ScanDate >= fromDate_ && d.ScanDate <= toDate_&&d => op.ProviderLocMappings.Any(pm => d.BatchDocumentEntity.ProviderName.Any(pnm => pnm.Name.Equals(pm.Key) && pnm.Selected == true) && pm.Value.Contains(d.BatchDocumentEntity.Location))).ToList();
It is returning list of documents
But it gives me error unsupported filtered Type Any. Kindly guide me on this how to use Any over here
Reply
Answers (
0
)
how to filter column name as well as respective va
Conversion from string to int in LINQ to SQL query