public void SaveDouble(ConfigPropertiesDouble stat) { using (var context = new ShardDbContext()) { context.Entry(stat).State = EntityState.Modified; context.SaveChanges(); } }
public void AddDouble(string key, double value, string description = null) { var stat = new ConfigPropertiesDouble { Key = key, Value = value, Description = description }; using (var context = new ShardDbContext()) { context.ConfigPropertiesDouble.Add(stat); context.SaveChanges(); } }