// // GET: /Forum/Delete/5 public ActionResult Delete(int id) { IForumRepository tmpRep = new SQLForumRepository(); var result = tmpRep.GetForumByID(id); return View(result); }
public ActionResult Details(int id) { IForumRepository tmpRep = new SQLForumRepository(); var result = tmpRep.GetForumByID(id); ViewBag.Message = "Forum detail"; return View(result); }
public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here IForumRepository tmpRep = new SQLForumRepository(); var forum = tmpRep.GetForumByID(id); tmpRep.DeleteForum(forum); return RedirectToAction("Index"); } catch { return View(); } }