示例#1
0
        public DetailsBlogVm GetBlogById(int id)
        {
            Blog          model = this.Context.Blogs.Find(id);
            DetailsBlogVm vm    = Mapper.Instance.Map <Blog, DetailsBlogVm>(model);

            return(vm);
        }
示例#2
0
        public ActionResult Details(int id)
        {
            DetailsBlogVm vm = this.service.GetBlogById(id);

            return(this.View(vm));
        }