Exemplo n.º 1
0
        public ActionResult Delete(int number)
        {
            ListGameDetails listGameDetails = _db.ListGameDB.Find(number);

            _db.ListGameDB.Remove(listGameDetails);
            _db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        //GET : Delete
        //Game/Delete/{name}
        public ActionResult Delete(int?number)
        {
            if (number == null)
            {
                return(new HttpStatusCodeResult(System.Net.HttpStatusCode.BadRequest));
            }
            ListGameDetails listGameDetails = _db.ListGameDB.Find(number);

            if (listGameDetails == null)
            {
                return(HttpNotFound());
            }
            return(View(listGameDetails));
        }