private void SetLang(BrandGroupLang postLang) { Title = postLang.Title; Description = postLang.Description; }
/// <summary> /// Deprecated Method for adding a new object to the BrandGroupLang EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToBrandGroupLang(BrandGroupLang brandGroupLang) { base.AddObject("BrandGroupLang", brandGroupLang); }
private void CreateOrChangeContentLang(SiteContainer context, BrandGroup instance, BrandGroup cache, Language lang) { BrandGroupLang contenttLang = null; if (cache != null) { contenttLang = context.BrandGroupLang.FirstOrDefault(p => p.BrandGroupId == cache.Id && p.LanguageId == lang.Id); } if (contenttLang == null) { var newPostLang = new BrandGroupLang { BrandGroupId = instance.Id, LanguageId = lang.Id, Title = instance.Title, Description = instance.Description }; context.AddToBrandGroupLang(newPostLang); } else { contenttLang.Title = instance.Title; contenttLang.Description = instance.Description; } context.SaveChanges(); }
/// <summary> /// Create a new BrandGroupLang object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="title">Initial value of the Title property.</param> /// <param name="description">Initial value of the Description property.</param> /// <param name="languageId">Initial value of the LanguageId property.</param> /// <param name="brandGroupId">Initial value of the BrandGroupId property.</param> public static BrandGroupLang CreateBrandGroupLang(global::System.Int32 id, global::System.String title, global::System.String description, global::System.Int32 languageId, global::System.Int32 brandGroupId) { BrandGroupLang brandGroupLang = new BrandGroupLang(); brandGroupLang.Id = id; brandGroupLang.Title = title; brandGroupLang.Description = description; brandGroupLang.LanguageId = languageId; brandGroupLang.BrandGroupId = brandGroupId; return brandGroupLang; }