public ActionResult AddEditEstudiante(int?id)
        {
            EstudianteModel model = new EstudianteModel();

            if (id.HasValue)
            {
                model = _ServiceEst.GetByIdEstudiante(id.Value);
            }
            return(PartialView("~/Views/Estudiante/_AddEditEstudiante.cshtml", model));
        }
        public ActionResult Crud(int id = 0)
        {
            EstudianteModelo model = new EstudianteModelo();

            /*  if (id.HasValue)
             * {
             *    model = _serviceEst.GetByIdEstudiante(id.Value);
             * }
             */
            return(View(id == 0 ? new EstudianteModelo() : _serviceEst.GetByIdEstudiante(id)));
        }
Esempio n. 3
0
 public ActionResult Crud(int id = 0)
 {
     return(View(id == 0 ? new EstudianteModelo() : _serviceEst.GetByIdEstudiante(id)));
 }