コード例 #1
0
ファイル: HomeController.cs プロジェクト: FFeat/learngit
        //根据ID,查询笔记信息
        //[LoginCheckFilter(IsCheck = false)]
        public ActionResult GetNoteInfoById()
        {
            int Id   = int.Parse(Request["Id"] ?? "0");
            var data = noteInfoService.GetEntities(n => n.Id == Id).Select(n => new { n.NoteName, n.SubTime, n.SubContent, n.UserInfoId }).FirstOrDefault();

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
 // GET: NoteInfo/Details/5
 public ActionResult Details(int id)
 {
     ViewData.Model = noteInfoService.GetEntities(n => n.Id == id).FirstOrDefault();
     return(View());
 }