Ejemplo n.º 1
0
        public static IEnumerable <ArticleModel> GetSeriesArticlesByMonth(string series, DateTime month)
        {
            var monthStart = new DateTime(month.Year, month.Month, 1);
            var articles   = StoredProcs.Articles_GetArticles(
                series,
                Domains.PublishedStatus.Published,
                monthStart,
                monthStart.AddMonths(1).AddSeconds(-1.0)
                ).Execute();

            return(articles.Select(a => ArticleModel.FromTable(a)));
        }
Ejemplo n.º 2
0
        private static IEnumerable <ArticleModel> GetArticlesByMonth(DateTime month, string series = null, string author = null)
        {
            var monthStart = new DateTime(month.Year, month.Month, 1);
            var articles   = StoredProcs.Articles_GetArticles(
                Series_Slug: series,
                PublishedStatus_Name: Domains.PublishedStatus.Published,
                RangeStart_Date: monthStart,
                RangeEnd_Date: monthStart.AddMonths(1).AddSeconds(-1.0),
                Author_Slug: author
                ).Execute();

            return(articles.Select(a => ArticleModel.FromTable(a)));
        }
Ejemplo n.º 3
0
        public static IEnumerable <ArticleModel> GetAllArticlesBySeries(string series)
        {
            var articles = StoredProcs.Articles_GetArticles(series, Domains.PublishedStatus.Published, null, null).Execute();

            return(articles.Select(a => ArticleModel.FromTable(a)));
        }