public void SaveBool(ConfigPropertiesBoolean stat) { using (var context = new ShardDbContext()) { context.Entry(stat).State = EntityState.Modified; context.SaveChanges(); } }
public void AddBool(string key, bool value, string description = null) { var stat = new ConfigPropertiesBoolean { Key = key, Value = value, Description = description }; using (var context = new ShardDbContext()) { context.ConfigPropertiesBoolean.Add(stat); context.SaveChanges(); } }