/// <summary>
 /// Create a new cg_LanguageTranslations object.
 /// </summary>
 /// <param name="languageTranslationId">Initial value of the LanguageTranslationId property.</param>
 /// <param name="original">Initial value of the Original property.</param>
 /// <param name="translated">Initial value of the Translated property.</param>
 public static cg_LanguageTranslations Createcg_LanguageTranslations(global::System.Int64 languageTranslationId, global::System.String original, global::System.String translated)
 {
     cg_LanguageTranslations cg_LanguageTranslations = new cg_LanguageTranslations();
     cg_LanguageTranslations.LanguageTranslationId = languageTranslationId;
     cg_LanguageTranslations.Original = original;
     cg_LanguageTranslations.Translated = translated;
     return cg_LanguageTranslations;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the cg_LanguageTranslations EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTocg_LanguageTranslations(cg_LanguageTranslations cg_LanguageTranslations)
 {
     base.AddObject("cg_LanguageTranslations", cg_LanguageTranslations);
 }
        public ActionResult translation_new(FormCollection collection)
        {
            var newItem = new cg_LanguageTranslations();

            // add values
            newItem.Original = collection["Original"];
            newItem.Translated = collection["Translated"];
            newItem.cg_LanguagesReference.EntityKey = new System.Data.EntityKey("caval_goEntities.cg_Languages", "LanguageId", long.Parse(collection["LanguageId"]));

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

            return RedirectToAction("translations");
        }