public void Save() { Translation.Languages[0].Type = WordSelectedType; Translation.Languages[1].Type = TranslationSelectedType; Translation.Languages[0].Synonysms = Language1Synonyms.ToList(); Translation.Languages[1].Synonysms = Language2Synonyms.ToList(); }
public TranslationVM(Translation translation, List <Language.Languages> languages) { Id = translation.Id; AssignLanguages(translation, languages); Language1.Synonysms.ForEach(s => Language1Synonyms.Add(s)); Language2.Synonysms.ForEach(s => Language2Synonyms.Add(s)); Translation.Languages.Add(Language1); Translation.Languages.Add(Language2); Line = translation.Line; }