public TopicsController(YeniBlogDbContext context)
 {
     _context        = context;
     topicRepository = new TopicRep(context);
     articleRep      = new ArticleRep(context);
     userRep         = new UserRep(context);
 }
Ejemplo n.º 2
0
        void IJob.Execute(IJobExecutionContext context)
        {
            var               artApi = new ApiMethod();
            var               ar     = new ArticleRep();
            List <string>     art    = new List <string>();
            List <ArticleApi> artDes = new List <ArticleApi>();
            int               i      = 0;

            artApi.Api(art, artDes);
            if (artDes.Count != 0)
            {
                foreach (var item in artDes)
                {
                    ar.Insert(ar.GetByIdApi(item.Id).ProccessResult);
                    i++;
                    if (i == 20)
                    {
                        break;
                    }
                }
            }
        }
Ejemplo n.º 3
0
 public NotActiveArticlesViewComponent(YeniBlogDbContext context)
 {
     _context   = context;
     articleRep = new ArticleRep(context);
 }
 public SortArticlesReadingTimeViewComponent(YeniBlogDbContext context)
 {
     _context   = context;
     articleRep = new ArticleRep(context);
 }
Ejemplo n.º 5
0
 public GetRandomArticlesViewComponent(YeniBlogDbContext context)
 {
     _context   = context;
     articleRep = new ArticleRep(context);
 }
 public ArticlesController(YeniBlogDbContext context)
 {
     _context   = context;
     articleRep = new ArticleRep(context);
     userRep    = new UserRep(context);
 }
 public TrendArticleListViewComponent(YeniBlogDbContext context)
 {
     _context   = context;
     articleRep = new ArticleRep(context);
 }