Exemple #1
0
        public IActionResult Editar(int id, string inputNombre, string inputInicio, string inputFinal)
        {
            EventoContext context = HttpContext.RequestServices.GetService(typeof(EventoContext)) as EventoContext;
            bool          result  = context.Edit(id, inputNombre, inputInicio, inputFinal);

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