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