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

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

            ViewBag.ContentItemID = new SelectList(db.ContentItems.OrderByDescending(e => e.CreatedOn), "ID", "Title", exhibitcontentitem.ContentItemID);
            ViewBag.ExhibitID = new SelectList(db.Exhibits.OrderByDescending(e => e.CreatedOn), "ID", "Title", exhibitcontentitem.ExhibitID);
            ViewBag.CreatedBy = new SelectList(db.Users, "ID", "UserName", exhibitcontentitem.CreatedBy);
            ViewBag.ModifiedBy = new SelectList(db.Users, "ID", "UserName", exhibitcontentitem.ModifiedBy);
            return View(exhibitcontentitem);
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the ExhibitContentItems EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToExhibitContentItems(ExhibitContentItem exhibitContentItem)
 {
     base.AddObject("ExhibitContentItems", exhibitContentItem);
 }
 /// <summary>
 /// Create a new ExhibitContentItem object.
 /// </summary>
 /// <param name="exhibitContentItemID">Initial value of the ExhibitContentItemID property.</param>
 /// <param name="exhibitID">Initial value of the ExhibitID property.</param>
 /// <param name="contentItemID">Initial value of the ContentItemID property.</param>
 public static ExhibitContentItem CreateExhibitContentItem(global::System.Guid exhibitContentItemID, global::System.Guid exhibitID, global::System.Guid contentItemID)
 {
     ExhibitContentItem exhibitContentItem = new ExhibitContentItem();
     exhibitContentItem.ExhibitContentItemID = exhibitContentItemID;
     exhibitContentItem.ExhibitID = exhibitID;
     exhibitContentItem.ContentItemID = contentItemID;
     return exhibitContentItem;
 }