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

            // add values
            newItem.Name = collection["languageName"];
            newItem.SystemLocale = collection["systemLocale"];

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

            return RedirectToAction("languages");
        }