常用方法
常用方法
常用方法
常用方法
public ActionResult Create(Comment comment) { if (ModelState.IsValid) { BlogServices.CreateComment(comment, UserServices.FindEntityByIdentity(CodeFirstSecurity.CurrentUserId)); return(RedirectToAction("Index")); } ViewBag.PostId = new SelectList(PostServices.FindAllEntities(null, null, null), "PostId", "Title", comment.PostId); return(View(comment)); }