SHARE
TWEET

Untitled

a guest Jun 16th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top