コード例 #1
0
 public ActionResult Edit([Bind(Include = "Id,Name")] GroupDancers groupDancers)
 {
     if (ModelState.IsValid)
     {
         db.Entry(groupDancers).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(groupDancers));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "Id,Name,Age,Phone,StudioAddress,StudioName,City,Email,Password")] Dancers dancers)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dancers).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dancers));
 }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "Id,Name,Age,Phone,CompanyAddress,CompanyName,City,Email,Password")] Teacher teacher)
 {
     if (ModelState.IsValid)
     {
         db.Entry(teacher).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(teacher));
 }