Пример #1
0
        public ArticleController()
        {
            var context = new VITVContext();

            _articleCategoryRepository     = new ArticleCategoryRepository(context);
            _articleHighlightAllRepository = new ArticleHighlightAllRepository(context);
            _articleHighlightCatRepository = new ArticleHighlightCatRepository(context);
            _articleRepository             = new ArticleRepository(context);
            _keywordRepository             = new KeywordRepository(context);
        }
Пример #2
0
 public ArticleController(IArticleCategoryRepository articleCategoryRepository, IArticleRevisionRepository articleRevisionRepository, IArticleHighlightCatRepository articleHighlightCatRepository, IArticleHighlightAllRepository articleHighlightAllRepository, IReporterRepository reporterRepository, IArticleRepository articleRepository, IArticleSeriesRepository articleSeriesRepository, IKeywordRepository keywordRepository)
 {
     _articleCategoryRepository     = articleCategoryRepository;
     _reporterRepository            = reporterRepository;
     _articleRepository             = articleRepository;
     _keywordRepository             = keywordRepository;
     _articleSeriesRepository       = articleSeriesRepository;
     _articleHighlightAllRepository = articleHighlightAllRepository;
     _articleHighlightCatRepository = articleHighlightCatRepository;
     _articleRevisionRepository     = articleRevisionRepository;
 }
Пример #3
0
        public HomeController()
        {
            var context = new VITVContext();

            _videoCategoryRepository       = new VideoCategoryRepository(context);
            _articleCategoryRepository     = new ArticleCategoryRepository(context);
            _videoRepository               = new VideoRepository(context);
            _articleRepository             = new ArticleRepository(context);
            _articleHighlightAllRepository = new ArticleHighlightAllRepository(context);
            _videoCatGroupRepository       = new VideoCatGroupRepository(context);
        }
Пример #4
0
 // If you are using Dependency Injection, you can delete the following constructor
 public ArticleController()
 {
     context = new VITVContext();
     _articleCategoryRepository     = new ArticleCategoryRepository(context);
     _reporterRepository            = new ReporterRepository(context);
     _articleRepository             = new ArticleRepository(context);
     _keywordRepository             = new KeywordRepository(context);
     _articleSeriesRepository       = new ArticleSeriesRepository(context);
     _articleHighlightAllRepository = new ArticleHighlightAllRepository(context);
     _articleHighlightCatRepository = new ArticleHighlightCatRepository(context);
     _articleRevisionRepository     = new ArticleRevisionRepository(context);
 }