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