예제 #1
0
        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();
        }
예제 #2
0
 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();
 }
예제 #3
0
 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();
 }