Example #1
0
 private void SetLang(ContentLang entityLang)
 {
     Title = entityLang.Title;
     Text = entityLang.Text;
     SeoDescription = entityLang.SeoDescription;
     SeoKeywords = entityLang.SeoKeywords;
     SeoText = entityLang.SeoText;
 }
Example #2
0
        private void CreateOrChangeEntityLanguage(Content cache)
        {
            var categoryLang = _store.ContentLangs.FirstOrDefault(r => r.ContentId == cache.Id && r.LanguageId == LangId);
            if (categoryLang == null)
            {
                var entityLang = new ContentLang
                {
                    ContentId = cache.Id,
                    LanguageId = LangId,

                    Title = cache.Title,
                    Text = cache.Text,
                    SeoDescription = cache.SeoDescription,
                    SeoKeywords = cache.SeoKeywords,
                    SeoText = cache.SeoText
                };
                _store.ContentLangs.Add(entityLang);
            }
            else
            {
                categoryLang.Title = cache.Title;
                categoryLang.SeoDescription = cache.SeoDescription;
                categoryLang.SeoKeywords = cache.SeoKeywords;
                categoryLang.SeoText = cache.SeoText;
                categoryLang.Text = cache.Text;

            }

        }