Exemplo n.º 1
0
        public void SaveXML(tblConfigMain pConfigMain)
        {
            using (var ctx = new CentralConfigEntities())
            {
                var configMainData = (ctx.tblConfigMains.Where(
                    s =>
                        (pConfigMain != null && s.ConfigName == pConfigMain.ConfigName &&
                         s.ConfigNamespace == pConfigMain.ConfigNamespace))).FirstOrDefault();

                if (pConfigMain.ConfigValue != null)
                    if (configMainData != null) configMainData.ConfigValue = pConfigMain.ConfigValue;

                int num = ctx.SaveChanges();
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new tblConfigMain object.
 /// </summary>
 /// <param name="configNamespace">Initial value of the ConfigNamespace property.</param>
 /// <param name="configName">Initial value of the ConfigName property.</param>
 /// <param name="configName2">Initial value of the ConfigName2 property.</param>
 public static tblConfigMain CreatetblConfigMain(global::System.String configNamespace, global::System.String configName, global::System.String configName2)
 {
     tblConfigMain tblConfigMain = new tblConfigMain();
     tblConfigMain.ConfigNamespace = configNamespace;
     tblConfigMain.ConfigName = configName;
     tblConfigMain.ConfigName2 = configName2;
     return tblConfigMain;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tblConfigMains EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotblConfigMains(tblConfigMain tblConfigMain)
 {
     base.AddObject("tblConfigMains", tblConfigMain);
 }