public ActionResult Guncelle([Bind(Include = "KullaniciId,Ad,Sifre,KullaniciAdi")] Kullanici kullanici) { if (ModelState.IsValid) { db.Entry(kullanici).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(kullanici)); }
public ActionResult Duzenle(Oyuncu oyn) { if (ModelState.IsValid) { using (TakimContext ctx = new TakimContext()) { ctx.Entry(oyn).State = EntityState.Modified; int sonuc = ctx.SaveChanges(); if (sonuc > 0) { return(RedirectToAction("Index")); } } } return(View(oyn)); }