private void validateDictStructure(List <LangContent> content, List <Languages> languages) { List <string> keyCollection = (from c in content select c.contentKey).ToList <string>(); foreach (Languages lang in languages) { List <string> keyCollectionInlang = (from c in content where c.langId == lang.id select c.contentKey).ToList <string>(); foreach (string key in keyCollection) { if (!keyCollectionInlang.Contains(key)) { LangContent newCont = new LangContent(); newCont.langId = lang.id; newCont.contentKey = key; conn.Insert(newCont); } } } }