Beispiel #1
0
 public ActionResult Edit([Bind(Include = "ID,UserName,UserPass,RegTime,Email")] UserInfo userInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(userInfo));
 }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,Name,Value")] Settings settings)
 {
     if (ModelState.IsValid)
     {
         db.Entry(settings).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(settings));
 }