private void CreateOrChangeEntityLanguage(QuickAdvice cache) { var categoryLang = _store.QuickAdviceLangs.FirstOrDefault(r => r.QuickAdviceId == cache.Id && r.LanguageId == LangId); if (categoryLang == null) { var entityLang = new QuickAdviceLang { QuickAdviceId = cache.Id, LanguageId = LangId, Title = cache.Title, Text = cache.Text, }; _store.QuickAdviceLangs.Add(entityLang); } else { categoryLang.Title = cache.Title; categoryLang.Text = cache.Text; } }
private void SetLang(QuickAdviceLang entityLang) { Title = entityLang.Title; Text = entityLang.Text; }