internal static Tuple <string, string> ToTuple(this IAzureIndex src)
 {
     return(Tuple.Create(src.PrimaryPartitionKey, src.PrimaryRowKey));
 }
        public async static Task <T> GetDataAsync <T>(this IAzureTableStorage <T> tableStorage, IAzureIndex index) where T : class, ITableEntity, new()
        {
            if (index == null)
            {
                return(null);
            }

            return(await tableStorage.GetDataAsync(index.PrimaryPartitionKey, index.PrimaryRowKey));
        }
        public async static Task <T> ReplaceAsync <T>(this IAzureTableStorage <T> tableStorage, IAzureIndex index, Func <T, T> action) where T : class, ITableEntity, new()
        {
            if (index == null)
            {
                return(null);
            }

            return(await tableStorage.ReplaceAsync(index.PrimaryPartitionKey, index.PrimaryRowKey, action));
        }
 public static Task <T> DeleteAsync <T>(this IAzureTableStorage <T> tableStorage, IAzureIndex index) where T : ITableEntity, new()
 {
     return(tableStorage.DeleteAsync(index.PrimaryPartitionKey, index.PrimaryRowKey));
 }
Beispiel #5
0
        public static Task <T> GetDataAsync <T>(this INoSQLTableStorage <T> tableStorage, IAzureIndex index) where T : class, ITableEntity, new()
        {
            if (index == null)
            {
                return(Task.FromResult <T>(null));
            }

            return(tableStorage.GetDataAsync(index.PrimaryPartitionKey, index.PrimaryRowKey));
        }