Esempio n. 1
0
        public void SaveString(ConfigPropertiesString stat)
        {
            using (var context = new ShardDbContext())
            {
                context.Entry(stat).State = EntityState.Modified;

                context.SaveChanges();
            }
        }
Esempio n. 2
0
        public void AddString(string key, string value, string description = null)
        {
            var stat = new ConfigPropertiesString
            {
                Key         = key,
                Value       = value,
                Description = description
            };

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

                context.SaveChanges();
            }
        }