public ActionResult Create(MUSTERI musteri) { if (ModelState.IsValid) { db.MUSTERI.Add(musteri); db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.ILID = new SelectList(db.IL, "ID", "ILADI", musteri.ILID); return View(musteri); }
public ActionResult Edit(MUSTERI musteri) { if (ModelState.IsValid) { db.Entry(musteri).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.ILID = new SelectList(db.IL, "ID", "ILADI", musteri.ILID); return View(musteri); }