public override object PrepareViewModel() { var postList = _nccPostService.LoadRecentPages(PostCount); RecentPostViewModel model = new RecentPostViewModel(); model.IsDateShow = IsDateShow; model.PostList = postList; return(model); }
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); }