예제 #1
0
        public ActionResult Create(Alumno alumno)
        {
            if (ModelState.IsValid)
            {
                db.Alumnoes.Add(alumno);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(alumno);
        }
예제 #2
0
 public ActionResult Edit(Alumno alumno)
 {
     if (ModelState.IsValid)
     {
         db.Entry(alumno).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(alumno);
 }