[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create([Bind(Exclude = "Id")] ContentPageNav contentToCreate)
{
DataClasses1DataContext dc = new DataClasses1DataContext();
ContentPageNav content = contentToCreate;
dc.SubmitChanges();
return RedirectToAction("Index");
}
我错过了记录未插入的内容?
答案 0 :(得分:0)
dc.ContentPageNavs.InsertOnSubmit(contentToCreate);