Beispiel #1
0
 public ActionResult Edit([Bind(Include = "Id,ParentId,Name")] Node node)
 {
     if (ModelState.IsValid)
     {
         db.Entry(node).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ParentId = new SelectList(db.Nodes, "Id", "Name", node.ParentId);
     return(View(node));
 }