public ActionResult Create(Studenti studenti) { if (ModelState.IsValid) { db.Studenti.Add(studenti); db.SaveChanges(); return RedirectToAction("Index"); } return View(studenti); }
public ActionResult Edit(Studenti studenti) { if (ModelState.IsValid) { db.Entry(studenti).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(studenti); }