private void CreateOrChangeEntityLanguage(ProductAttribute cache) { var categoryLang = _store.ProductAttributeLangs.FirstOrDefault(r => r.ProductAttributeId == cache.Id && r.LanguageId == LangId); if (categoryLang == null) { var entityLang = new ProductAttributeLang { ProductAttributeId = cache.Id, LanguageId = LangId, Title = cache.Title, UnitTitle = cache.UnitTitle, }; _store.ProductAttributeLangs.Add(entityLang); } else { categoryLang.Title = cache.Title; categoryLang.UnitTitle = cache.UnitTitle; } }
private void SetLang(ProductAttributeLang entityLang) { Title = entityLang.Title; UnitTitle = entityLang.UnitTitle; }