public ActionResult Create(TourBookmark tourbookmark)
        {
            if (!Authorization.GetAccess(table, HttpContext.User.Identity.Name, write))
                return RedirectToAction("Index", "Home");

            if (ModelState.IsValid)
            {
                tourbookmark.TourBookmarkID = Guid.NewGuid();
                tourbookmark.CreatedBy = Guid.Parse(Session["userid"].ToString());
                tourbookmark.CreatedOn = DateTime.Now;
                db.TourBookmarks.AddObject(tourbookmark);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.BookmarkID = new SelectList(db.BookMarks.Where(tu => tu.IsDeleted == null || tu.IsDeleted == false), "ID", "Name", tourbookmark.BookmarkID);
            ViewBag.TourID = new SelectList(db.Tours.Where(tu => tu.IsDeleted == null || tu.IsDeleted == false), "ID", "Name", tourbookmark.TourID);
            ViewBag.CreatedBy = new SelectList(db.Users, "ID", "UserName", tourbookmark.CreatedBy);
            ViewBag.ModifiedBy = new SelectList(db.Users, "ID", "UserName", tourbookmark.ModifiedBy);
            return View(tourbookmark);
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the TourBookmarks EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTourBookmarks(TourBookmark tourBookmark)
 {
     base.AddObject("TourBookmarks", tourBookmark);
 }
 /// <summary>
 /// Create a new TourBookmark object.
 /// </summary>
 /// <param name="tourBookmarkID">Initial value of the TourBookmarkID property.</param>
 /// <param name="tourID">Initial value of the TourID property.</param>
 /// <param name="bookmarkID">Initial value of the BookmarkID property.</param>
 /// <param name="sequenceNumber">Initial value of the SequenceNumber property.</param>
 public static TourBookmark CreateTourBookmark(global::System.Guid tourBookmarkID, global::System.Guid tourID, global::System.Guid bookmarkID, global::System.Int16 sequenceNumber)
 {
     TourBookmark tourBookmark = new TourBookmark();
     tourBookmark.TourBookmarkID = tourBookmarkID;
     tourBookmark.TourID = tourID;
     tourBookmark.BookmarkID = bookmarkID;
     tourBookmark.SequenceNumber = sequenceNumber;
     return tourBookmark;
 }