public ActionResult Edit([Bind(Include = "Id,Name")] ExamNames ExamNames) { if (ModelState.IsValid) { rep.Update(ExamNames); return(RedirectToAction("Index")); } return(View(ExamNames)); }
public ActionResult Delete(int id = 0) { ExamNames user = rep.GetById(id); if (user == null) { return(HttpNotFound()); } return(View(user)); }
public ActionResult Create([Bind(Include = "Name")] ExamNames ExamNames) { if (ModelState.IsValid) { rep.Add(ExamNames); return(RedirectToAction("Index")); } return(View(ExamNames)); }
public void Update(ExamNames entity) { rep.Update(entity, x => x.Name); }
public ExamNames Add(ExamNames entity) { return(rep.Add(entity)); }