public ActionResult Basic(int id) { Node node = NodeService.GetNode(id); if (node == null) { return(new HttpNotFoundResult("Node not found")); } NodeVM vm = NodeVM.FromModel(node); return(new JsonNetResult(vm)); }
public ActionResult Edit(int?id) { if (id.HasValue) { Node node = NodeService.GetNode(id.Value); if (node == null) { return(new HttpNotFoundResult("Node not found")); } NodeVM vm = NodeVM.FromModel(node).Fill(); return(View(vm)); } return(View(NodeVM.FromModel().Fill())); }