/// <summary>
 /// Deprecated Method for adding a new object to the ConfigSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToConfigSet(Config config)
 {
     base.AddObject("ConfigSet", config);
 }
 /// <summary>
 /// Create a new Config object.
 /// </summary>
 /// <param name="key">Initial value of the Key property.</param>
 /// <param name="value">Initial value of the Value property.</param>
 public static Config CreateConfig(global::System.String key, global::System.String value)
 {
     Config config = new Config();
     config.Key = key;
     config.Value = value;
     return config;
 }
예제 #3
0
 private Config GetConfigOrCreate(string key)
 {
     Config entry = (from c in _database.ConfigSet
                     where c.Key == key
                     select c).FirstOrDefault();
     if (entry == null)
     {
         entry = new Config
         {
             Key = key,
             Value = ""
         };
         _database.ConfigSet.AddObject(entry);
     }
     return entry;
 }