Example #1
0
        public List <SubCategoryViewModel> GetSubCategoryByCategoryId(string categoryId)
        {
            var result = categoryRepository.GetSubCategoryByCategoryId(categoryId);

            return(AutoMapHelper.ToList <pub_SubCategoryEntity, SubCategoryViewModel>(result));
        }
Example #2
0
        public List <CategoryViewModel> GetCategory()
        {
            var result = categoryRepository.GetCategory();

            return(AutoMapHelper.ToList <pub_CategoryEntity, CategoryViewModel>(result));
        }
Example #3
0
        public List <ArticleDtoViewModel> GetLatestArticle()
        {
            var result = articleRepository.GetLatestArticle();

            return(AutoMapHelper.ToList <ArticleDto, ArticleDtoViewModel>(result));
        }
Example #4
0
        public List <CommentViewModel> GetCommentByArticleId(string ArticleId)
        {
            var result = articleRepository.GetCommentByArticleId(ArticleId);

            return(AutoMapHelper.ToList <ArticleCommentEntity, CommentViewModel>(result));
        }
Example #5
0
        public List <ArticleDtoViewModel> GetArticleDtoBySubCategoryId(string categoryId, string subCategoryId)
        {
            var result = articleRepository.GetArticleDtoBySubCategoryId(categoryId, subCategoryId);

            return(AutoMapHelper.ToList <ArticleDto, ArticleDtoViewModel>(result));
        }
Example #6
0
        public List <ArticleViewModel> GetArticleBySubCategoryId(string subCategoryId)
        {
            var result = articleRepository.GetArticleBySubCategoryId(subCategoryId);

            return(AutoMapHelper.ToList <ArticleEntity, ArticleViewModel>(result));
        }