public static async Task UpdateAsync(this IKeyValueStorage source, string tableName, Value value) { EnsureArg.IsNotNullOrEmpty(tableName, nameof(tableName)); EnsureArg.IsNotNull(value, nameof(value)); await source.UpdateAsync(new List <Value> { value }).AnyContext(); }
public static async Task UpdateAsync <T>(this IKeyValueStorage source, IEnumerable <T> values) where T : class, new() { await source.UpdateAsync(typeof(T).Name.Pluralize(), values.Safe().Select(Map)).AnyContext(); }
public static async Task UpdateAsync <T>(this IKeyValueStorage source, T value) where T : class, new() { await source.UpdateAsync(typeof(T).Name.Pluralize(), Map(value)).AnyContext(); }