public UnitOfWork(LeakDbContext db) { _db = db; _postRepository = new PostRepository(db); _sentPostRepository = new SentPostRepository(db); _blogRepository = new BlogRepository(db); _categoryRepository = new CategoryRepository(db); _trendingPostsSectionRepository = new SpecialPostsSectionRepository <TrendPostSection>(db); _interestingPostsSectionRepository = new SpecialPostsSectionRepository <InterestingPostSection>(db); _appUserRepository = new AppUserRepository(db); }
public PostsSectionService(IMediator mediator, ISpecialPostsSectionRepository <TSection> repo, IMapper mapper) { _mediator = mediator; _repo = repo; _mapper = mapper; }
public PostsSectionCommandHandler(ISpecialPostsSectionRepository <TSection> repo, IPostRepository postRepository) { _sectionRepository = repo; _postRepository = postRepository; }