public Language GetLanguageByName(string name) { LanguageTableAdapter adapter = new LanguageTableAdapter(); MultiLingualData.LanguageDataTable table = adapter.GetLanguageByName(name); if (table.Count == 0) { return(null); } return(MultiLingualHelper.ToLanguageDTO(table[0])); }
public List <Language> GetAllLanguages() { List <Language> langs = new List <Language>(); LanguageTableAdapter adapter = new LanguageTableAdapter(); MultiLingualData.LanguageDataTable table = adapter.GetAllLanguages(); foreach (MultiLingualData.LanguageRow row in table) { langs.Add(MultiLingualHelper.ToLanguageDTO(row)); } return(langs); }