Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. public class Category
  2. {
  3. public string Name {get;set;}
  4. public IList<Category> SubCategories {get;set;}
  5. }
  6.  
  7. public class Story
  8. {
  9. public string Title {get;set;}
  10. public IList<Category> Categories {get;set;}
  11. }
  12.  
  13. dbStory.EnsureIndex(x => x.Categories, "$.Categories[*]");
  14.  
  15. var stories = dbStory.Find(x => x.Categories.Contains(categoryName));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement