public ActionResult Edit([Bind(Include = "Id,KategoriAdi")] Kategori kategori) { if (ModelState.IsValid) { db.Entry(kategori).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(kategori)); }
public ActionResult Edit([Bind(Include = "Id,Yazi,KategoriId")] AlinanNot alinanNot) { if (ModelState.IsValid) { db.Entry(alinanNot).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.KategoriId = new SelectList(db.Kategoris, "Id", "KategoriAdi", alinanNot.KategoriId); return(View(alinanNot)); }