// GET: CadeteController/Delete/5

        /*public ActionResult Delete(int id)
         * {
         *   return View();
         * }*/

        // POST: CadeteController/Delete/5
        //[HttpPost]
        // [ValidateAntiForgeryToken]
        public ActionResult Delete(int id)
        {
            try
            {
                RepoCadetes repoCadete = new RepoCadetes();
                repoCadete.EliminarUsuario(id);
                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
            //listaCadetes.RemoveAll(t => t.Id == id);
            return(View());
        }