示例#1
0
 public ActionResult Edit(bookmarks Bookmarks)
 {
     if (ModelState.IsValid)
     {
         Bookmarks.personID = (Session["person"] as Person).ID;
         db.Entry(Bookmarks).State = EntityState.Modified;
         db.SaveChanges();
         return Content(Boolean.TrueString);
     }
     return View(Bookmarks);
 }
示例#2
0
        public ActionResult Create(bookmarks bookmarks)
        {
            if (ModelState.IsValid)
            {
                bookmarks.personID = (Session["person"] as Person).ID;
                db.bookmarks.Add(bookmarks);
                db.SaveChanges();
                 return Content(Boolean.TrueString);

            }
            return View(bookmarks);
        }