// POST: Accounts/Delete/5 //[HttpPost, ActionName("Delete")] //[ValidateAntiForgeryToken] //public ActionResult DeleteConfirmed(int id) //{ // if (Session["Username"] != null) // { // Account account = db.Accounts.Find(id); // db.Accounts.Remove(account); // db.SaveChanges(); // return RedirectToAction("Index"); // } // else // { // return RedirectToAction("Login", "Accounts"); // } //} protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }