public ActionResult Delete(int mobileId) { Mobile deletedMobile = repository.DeleteMobile(mobileId); if (deletedMobile != null) { TempData["message"] = string.Format("Game \"{0}\" was deleted", deletedMobile.Name); } return(RedirectToAction("Index")); }