예제 #1
0
        public ActionResult Get(int id)
        {
            Post          post  = PostService.GetById(id);
            PostOutputDto model = post.Mapper <PostOutputDto>();

            model.Seminars = post.Seminar.Select(s => s.Seminar.Title).Join(",");
            return(ResultData(model));
        }
예제 #2
0
        public ActionResult AddTop(PostOutputDto p)
        {
            Post post = PostBll.GetById(p.Id);

            post.IsBanner    = true;
            post.Description = p.Description;
            post.ImageUrl    = p.ImageUrl;
            bool b = PostBll.UpdateEntitySaved(post);

            return(ResultData(null, b, b ? "添加头图页成功" : "添加头图页失败!"));
        }