// // GET: /Platform/SysDepartment/Edit/5 public ActionResult Edit(Guid? id) { var item = new Knowledge(); if (id.HasValue) { item = _iKnowledgeService.GetById(id.Value); } return View(item); }
public ActionResult Edit(Guid? id, Knowledge collection) { if (!ModelState.IsValid) { return View(collection); } _iKnowledgeService.Save(id, collection); _unitOfWork.Commit(); return RedirectToAction("Index"); }