public void SaveString(ConfigPropertiesString stat) { using (var context = new ShardDbContext()) { context.Entry(stat).State = EntityState.Modified; context.SaveChanges(); } }
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(); } }