/// <summary>
 /// Create a new cg_cms_StaticBlocks object.
 /// </summary>
 /// <param name="staticBlockId">Initial value of the StaticBlockId property.</param>
 public static cg_cms_StaticBlocks Createcg_cms_StaticBlocks(global::System.Int64 staticBlockId)
 {
     cg_cms_StaticBlocks cg_cms_StaticBlocks = new cg_cms_StaticBlocks();
     cg_cms_StaticBlocks.StaticBlockId = staticBlockId;
     return cg_cms_StaticBlocks;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the cg_cms_StaticBlocks EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTocg_cms_StaticBlocks(cg_cms_StaticBlocks cg_cms_StaticBlocks)
 {
     base.AddObject("cg_cms_StaticBlocks", cg_cms_StaticBlocks);
 }
        public ActionResult cms_staticblock_new(FormCollection collection)
        {
            var newItem = new cg_cms_StaticBlocks();

            // add values
            newItem.Name = collection["blockName"];

            // add to DB & save
            db.AddTocg_cms_StaticBlocks(newItem);
            db.SaveChanges();

            return RedirectToAction("cms_staticblocks");
        }