/// <summary> /// Prompting for a language family-language link table. /// </summary> private static void AddLangfamLangLinkPrompt() { langfam_lang_link lll = new langfam_lang_link(); string input; // Language family id Console.Write("langfam_id: "); input = Console.ReadLine(); if (input != string.Empty) { if (int.TryParse(input, out int langfam_id)) { lll.langfam_id = langfam_id; } else { throw new FormatException(); } } else { throw new EmptyInputException(); } // Language id Console.Write("lang_id: "); input = Console.ReadLine(); if (input != string.Empty) { if (int.TryParse(input, out int lang_id)) { lll.lang_id = lang_id; } else { throw new FormatException(); } } else { throw new EmptyInputException(); } new LangfamLangLinkLogic().Insert(lll); }
/// <inheritdoc/> public void AddLangfamLangLink(langfam_lang_link lll) { this.db.langfam_lang_link.Add(lll); this.db.SaveChanges(); }