Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "RoleId,role,Description,DateCreated,DateUpdated")] Role role)
 {
     if (ModelState.IsValid)
     {
         db.Entry(role).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(role));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "UserId,UserName,FirstName,LastName,Email,DateCreated,DateUpdated")] User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
 public ActionResult Edit([Bind(Include = "CampaginId,Name,Description,DungeonMasterId,DateCreated,DateUpdated")] Campaign campaign)
 {
     if (ModelState.IsValid)
     {
         db.Entry(campaign).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DungeonMasterId = new SelectList(db.Users, "UserId", "UserName", campaign.DungeonMasterId);
     return(View(campaign));
 }