示例#1
0
        public void SaveLong(ConfigPropertiesLong stat)
        {
            using (var context = new ShardDbContext())
            {
                context.Entry(stat).State = EntityState.Modified;

                context.SaveChanges();
            }
        }
示例#2
0
        public void AddLong(string key, long value, string description = null)
        {
            var stat = new ConfigPropertiesLong
            {
                Key         = key,
                Value       = value,
                Description = description
            };

            using (var context = new ShardDbContext())
            {
                context.ConfigPropertiesLong.Add(stat);

                context.SaveChanges();
            }
        }