コード例 #1
0
 public ActionResult Edit([Bind(Include = "Id,Name,Amount")] Market market)
 {
     if (ModelState.IsValid)
     {
         db.Entry(market).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(market));
 }
コード例 #2
0
ファイル: PersonController.cs プロジェクト: redfish0617/0326
 public ActionResult Edit([Bind(Include = "Id,Account,Password,Name")] Person person)
 {
     if (ModelState.IsValid)
     {
         db.Entry(person).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(person));
 }