public NewsService(ILogger <NewsService> logger, IDateTimeProvider dateTimeProvider, IGraCache cache, IJobRepository jobRepository, INewsCategoryRepository newsCategoryRepository, INewsPostRepository newsPostRepository, ISiteRepository siteRepository, IUserContextProvider userContextProvider, IUserRepository userRepository, EmailService emailService) : base(logger, dateTimeProvider, userContextProvider) { SetManagementPermission(Permission.ManageNews); _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _jobRepository = jobRepository ?? throw new ArgumentNullException(nameof(jobRepository)); _newsCategoryRepository = newsCategoryRepository ?? throw new ArgumentNullException(nameof(newsCategoryRepository)); _newsPostRepository = newsPostRepository ?? throw new ArgumentNullException(nameof(newsPostRepository)); _siteRepository = siteRepository ?? throw new ArgumentNullException(nameof(siteRepository)); _userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository)); _emailService = emailService ?? throw new ArgumentNullException(nameof(emailService)); }
public IndexController() { this.unitOfWork = new UnitOfWork(); this.newsCategoryRepository = RepositoryFactory.GetRepository<INewsCategoryRepository, NewsCategory>(this.unitOfWork); this.newsRepository = RepositoryFactory.GetRepository<INewsRepository, News>(this.unitOfWork); }
public NewsService(INewsItemRepository newsRepository, INewsCategoryRepository newsCategoryRepository, IUrlEngine <NewsItem> urlEngine) { _newsRepository = newsRepository; _newsCategoryRepository = newsCategoryRepository; _urlEngine = urlEngine; }
public HomeController() { this.unitOfWork = new UnitOfWork(); this.newsCategoryRepository = RepositoryFactory.GetRepository<INewsCategoryRepository, NewsCategory>(this.unitOfWork); this.newsRepository = RepositoryFactory.GetRepository<INewsRepository, News>(this.unitOfWork); this.deliverNoticeRepository = RepositoryFactory.GetRepository<IDeliverNoticeRepository, DeliverNotice>(this.unitOfWork); this.businessCheckNoticeRespository = RepositoryFactory.GetRepository<IBusinessCheckNoticeRepository, BusinessCheckNotice>(this.unitOfWork); this.pipeIncomeRecordRepository = RepositoryFactory.GetRepository<IPipeIncomeRecordRepository, PipeIncomeRecord>(this.unitOfWork); this.pipeNeedNoticeRepository = RepositoryFactory.GetRepository<IPipeNeedNoticeRepository, PipeNeedNotice>(this.unitOfWork); this.outgoingNoticeRepository = RepositoryFactory.GetRepository<IOutgoingNoticeRepository, OutgoingNotice>(this.unitOfWork); this.normalCheckTaskRepository = RepositoryFactory.GetRepository<INormalCheckTaskRepository, NormalCheckTask>(this.unitOfWork); this.ReturningNoticeRepository = RepositoryFactory.GetRepository<IReturningNoticeRepository, ReturningNotice>(this.unitOfWork); }
public NewsController(INewsRepository newsRepository, IKeywordRepository keywordRepository, IPlaceRepository placeRepository, ICategoryRepository categoryRepository, INewsKeywordRepository newsKeywordRepository, INewsPublishPlaceRepository newsPublishPlaceRepository, INewsCategoryRepository newsCategoryRepository ) { _newsRepository = newsRepository; _keywordRepository = keywordRepository; _placeRepository = placeRepository; _categoryRepository = categoryRepository; _newsKeywordRepository = newsKeywordRepository; _newsPublishPlaceRepository = newsPublishPlaceRepository; _newsCategoryRepository = newsCategoryRepository; }
public NewsCategoryController() { this.unitOfWork = new UnitOfWork(); this.repository = RepositoryFactory.GetRepository<INewsCategoryRepository, NewsCategory>(unitOfWork); }
//private readonly static ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); public NewsService( IUnitOfWork unitwork, INewsRepository newsRepository, INewsCategoryRepository newsCategoryRepository ) { this.unitwork = unitwork; this.newsRepository = newsRepository; this.newsCategoryRepository = newsCategoryRepository; }
public HomeController(IUserSettingRepository userSettingRepo, INewsCategoryRepository newsCategoryRepo) { _userSettingRepo = userSettingRepo; _newsCategoryRepo = newsCategoryRepo; }
/// <summary> /// Constructor to get and set database context and news category interface /// </summary> /// <param name="applicationdb"></param> /// <param name="newsCategory"></param> public Initializer(ApplicationDbContext applicationdb, INewsCategoryRepository newsCategory) { _applicationdb = applicationdb; _newsCategory = newsCategory; }