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); }
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); }