Exemplo n.º 1
0
        public void SaveDouble(ConfigPropertiesDouble stat)
        {
            using (var context = new ShardDbContext())
            {
                context.Entry(stat).State = EntityState.Modified;

                context.SaveChanges();
            }
        }
Exemplo n.º 2
0
        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();
            }
        }