public ActionResult Edit([Bind(Include = "CategoryId,CategoryName")] Category category)
 {
     if (ModelState.IsValid)
     {
         db.Entry(category).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(category));
 }
 public ActionResult Edit([Bind(Include = "ReviewId,Rating,Comment,ReviewDate")] Review review)
 {
     if (ModelState.IsValid)
     {
         db.Entry(review).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(review));
 }
Exemple #3
0
 public ActionResult Edit([Bind(Include = "UserID,Email,Username,Password,ConfirmPassword,Tokens,PhoneNumber,UserType")] Register register)
 {
     if (ModelState.IsValid)
     {
         db.Entry(register).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(register));
 }
 public ActionResult Edit([Bind(Include = "GameID,CategoryId,GameName,Price,Time,Image")] Games games)
 {
     if (ModelState.IsValid)
     {
         db.Entry(games).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CategoryId = new SelectList(db.Category, "CategoryId", "CategoryName", games.CategoryId);
     return(View(games));
 }