public ActionResult Edit(int id,Student student) { try { // TODO: Add update logic here unitofwork.StudentRepository.Update(student); unitofwork.Save(); return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Create(Student student) { try { // TODO: Add insert logic here unitofwork.StudentRepository.Insert(student); unitofwork.Save(); return RedirectToAction("Index"); } catch { return View(); } }