public ActionResult KitapEkle(Kitap ktp) { if (ModelState.IsValid) { ctx.Kitaplar.Add(ktp); int sonuc = ctx.SaveChanges(); if (sonuc > 0) { return(RedirectToAction("Index")); } } return(View()); }
public ActionResult OkuyanEkle(Okuyan oky) { if (ModelState.IsValid) { ctx.Okuyanlar.Add(oky); } int sonuc = ctx.SaveChanges(); if (sonuc > 0) { return(RedirectToAction("Index")); } return(View()); }
public ActionResult Kayit(Kullanici klc) { if (ModelState.IsValid) { ctx.Kullanicilar.Add(klc); } int sonuc = ctx.SaveChanges(); if (sonuc > 0) { return(RedirectToAction("Login", "Giris")); } return(View()); }
public ActionResult YazarEkle(Yazar yz) { ctx.Yazarlar.Add(yz); ctx.SaveChanges(); return(RedirectToAction("Index")); }