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

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