示例#1
0
        public IActionResult Eliminar(int id)
        {
            EventoContext context = HttpContext.RequestServices.GetService(typeof(EventoContext)) as EventoContext;
            bool          result  = context.Eliminar(id);

            if (result)
            {
                return(RedirectToAction("Index", "Evento", new { id = id, result = "Success" }));
            }
            return(RedirectToAction("Index", "Evento", new { id = id, result = "Failure" }));
        }