示例#1
0
 public ActionResult Create(FormCollection collection)
 {
     try
     {
         // TODO: Add insert logic here
         AlumnoModels alumno = new AlumnoModels();
         alumno.Legajo   = int.Parse(Request.Form["legajo"].ToString());
         alumno.Nombre   = Request.Form["nombre"];
         alumno.Apellido = Request.Form["apellido"];
         alumnos.Add(alumno);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
 public AlumnoesController(ApplicationDbContext context)
 {
     _context     = context;
     alumnoModels = new AlumnoModels(_context);
 }