Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Category
- {
- public string Name {get;set;}
- public IList<Category> SubCategories {get;set;}
- }
- public class Story
- {
- public string Title {get;set;}
- public IList<Category> Categories {get;set;}
- }
- dbStory.EnsureIndex(x => x.Categories, "$.Categories[*]");
- var stories = dbStory.Find(x => x.Categories.Contains(categoryName));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement