コード例 #1
0
 public ActionResult Edit(ToReviewEntity toreviewentity)
 {
     if (ModelState.IsValid)
     {
         db.Entry(toreviewentity).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(toreviewentity));
 }
コード例 #2
0
        public ActionResult FacebookCallback2(fbuser user)
        {
            ReviewsContext db = new ReviewsContext();

            user.id = iduserG;
            db.Users.Attach(user);

            foreach (var item in user.pagelist)
            {
                db.Pages.Attach(item);

                db.Entry(item).State = EntityState.Modified;
            }
            //user.id = 10213618568591702+"";


            db.Entry(user).State = EntityState.Modified;

            fuserG = user;
            db.SaveChanges();
            return(RedirectToAction("FacebookCallback3", "Home"));
        }