Пример #1
0
 public UnitOfWork(ApplicationDbContext db,
                   ICategoryRepository <Category> _category,
                   IMainCommentRepository <MainComment> _mainComment,
                   ISubCommentRepository <SubComment> _subComment,
                   IGenericRepository <Post> _post)
 {
     _db         = db;
     Category    = _category;
     MainComment = _mainComment;
     SubComment  = _subComment;
     Post        = _post;
 }
Пример #2
0
 public HomeController(IPostRepository postRepository,
                       IImageManager imageManager,
                       ICommentRepository commentRepository,
                       ISubCommentRepository subCommentRepository,
                       IContactRepository contactRepository)
 {
     _postRepository       = postRepository;
     _imageManager         = imageManager;
     _commentRepository    = commentRepository;
     _subCommentRepository = subCommentRepository;
     _contactRepository    = contactRepository;
 }