示例#1
0
        public override object PrepareViewModel()
        {
            var postList = _nccPostService.LoadRecentPages(PostCount);
            RecentPostViewModel model = new RecentPostViewModel();

            model.IsDateShow = IsDateShow;
            model.PostList   = postList;
            return(model);
        }
示例#2
0
        public override string RenderBody()
        {
            var postList             = _nccPostService.LoadRecentPages(PostCount);
            RecentPostViewModel item = new RecentPostViewModel();

            item.IsDateShow = IsDateShow;
            item.PostList   = postList;
            var body = _viewRenderService.RenderToStringAsync <BlogController>(ViewFileName, item).Result;

            return(body);
        }