コード例 #1
0
 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));
 }
コード例 #2
0
 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));
 }