Exemple #1
0
 private void SetLang(BrandGroupItemLang lang)
 {
     Text = lang.Text;
 }
Exemple #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the BrandGroupItemLang EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToBrandGroupItemLang(BrandGroupItemLang brandGroupItemLang)
 {
     base.AddObject("BrandGroupItemLang", brandGroupItemLang);
 }
        private void CreateOrChangeContentLang(SiteContainer context, BrandGroupItem instance, BrandGroupItem cache, Language lang)
        {

            BrandGroupItemLang contenttLang = null;
            if (cache != null)
            {
                contenttLang = context.BrandGroupItemLang.FirstOrDefault(p => p.BrandGroupItemId == cache.Id && p.LanguageId == lang.Id);
            }
            if (contenttLang == null)
            {
                var newPostLang = new BrandGroupItemLang
                {
                    BrandGroupItemId = instance.Id,
                    LanguageId = lang.Id,
                    Text = instance.Text
                };
                context.AddToBrandGroupItemLang(newPostLang);
            }
            else
            {
                contenttLang.Text = instance.Text;
            }
            context.SaveChanges();

        }
Exemple #4
0
 /// <summary>
 /// Create a new BrandGroupItemLang object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="text">Initial value of the Text property.</param>
 /// <param name="languageId">Initial value of the LanguageId property.</param>
 /// <param name="brandGroupItemId">Initial value of the BrandGroupItemId property.</param>
 public static BrandGroupItemLang CreateBrandGroupItemLang(global::System.Int32 id, global::System.String text, global::System.Int32 languageId, global::System.Int32 brandGroupItemId)
 {
     BrandGroupItemLang brandGroupItemLang = new BrandGroupItemLang();
     brandGroupItemLang.Id = id;
     brandGroupItemLang.Text = text;
     brandGroupItemLang.LanguageId = languageId;
     brandGroupItemLang.BrandGroupItemId = brandGroupItemId;
     return brandGroupItemLang;
 }