/// <summary> /// Create a new cg_cms_Pages object. /// </summary> /// <param name="pageId">Initial value of the PageId property.</param> public static cg_cms_Pages Createcg_cms_Pages(global::System.Int64 pageId) { cg_cms_Pages cg_cms_Pages = new cg_cms_Pages(); cg_cms_Pages.PageId = pageId; return cg_cms_Pages; }
/// <summary> /// Deprecated Method for adding a new object to the cg_cms_Pages EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTocg_cms_Pages(cg_cms_Pages cg_cms_Pages) { base.AddObject("cg_cms_Pages", cg_cms_Pages); }
public ActionResult cms_page_new(FormCollection collection) { var newItem = new cg_cms_Pages(); // add values newItem.Name = collection["pageName"]; // add to DB & save db.AddTocg_cms_Pages(newItem); db.SaveChanges(); return RedirectToAction("cms_pages"); }