コード例 #1
0
ファイル: AccountsController.cs プロジェクト: Anh7999/TMDT
 public ActionResult Edit([Bind(Include = "Sdt,TenKH,DiachiKH,Ngaydangki,Matkhau,Level")] Account account)
 {
     if (ModelState.IsValid)
     {
         db.Entry(account).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(account));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "id,username,password,lever")] user user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }