コード例 #1
0
 public ActionResult Edit([Bind(Include = "Id,Name,DateStarted,Type")] BeeHive beeHive)
 {
     if (ModelState.IsValid)
     {
         db.Entry(beeHive).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(beeHive));
 }
コード例 #2
0
ファイル: BeesController.cs プロジェクト: JohnFx/HastyRetreat
 public ActionResult Edit([Bind(Include = "Id,Name,isAngry,Role,Species,Sound,canSting")] Bee bee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bee));
 }