Exemplo n.º 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));
        }
Exemplo n.º 2
0
 public static async Task <TableResult> ExecuteWithTableAsync(this AzureStorageOptions options, string tableName, TableOperation operation)
 {
     return(await options.GetCloudTable(tableName).ExecuteAsync(operation));
 }