Exemple #1
0
        public static CloudTable GetCloudTable(this AzureStorageOptions options, string tableName)
        {
            var account = CloudStorageAccount.Parse($"DefaultEndpointsProtocol=https;AccountName={options.AccountName};AccountKey={options.Key}");
            var client  = account?.CreateCloudTableClient();

            return(client?.GetTableReference(tableName));
        }
Exemple #2
0
 public static async Task <TableResult> ExecuteWithTableAsync(this AzureStorageOptions options, string tableName, TableOperation operation)
 {
     return(await options.GetCloudTable(tableName).ExecuteAsync(operation));
 }