// 4. ************* DELETE User DETAILS ****************** // GET: User/Delete/5 public ActionResult Delete(int id) { try { IConnection connection = new Connection(); connection.Fetch(); IDAO <Utilizador> uDAO = new UtilizadorDAO(connection); if (uDAO.remove(Convert.ToString(id))) { ViewBag.AlertMsg = "User Deleted Successfully"; } return(RedirectToAction("Index")); } catch { return(View()); } }
public void deleteUser() { uDAO.remove(this.user.Email); logout(); }