Example #1
0
 public PostService(HooliContext context)
 {
     byKey = new Lazy <Dictionary <int, Post> >(() => context.Posts.Include(u => u.User)
                                                .Include(g => g.Group).ToDictionary(c => c.PostId));
     topLevel  = new Lazy <Post[]>(() => byKey.Value.Values.Where(c => c.ParentPostId == null).ToArray());
     DbContext = context;
 }
Example #2
0
 public FeedComponent(UserService userService, HooliContext dbContext)
 {
     UserService = userService;
     DbContext   = dbContext;
 }
Example #3
0
 public UserService(HooliContext dbContext)
 {
     DbContext = dbContext;
 }