Switching to Azure.Data.Tables
For an overview refer to the official Azure migration guide.
In brief though, instances of CloudTableClient need to be replaced with TableServiceClient.
Instantiating classes with clients
Instead of:
var transport = new AzureStorageQueueTransport(
new QueueServiceClient("connection_string"),
new BlobServiceClient("connection_string"),
CloudStorageAccount.Parse("connection_string").CreateCloudTableClient());
var accountInfo = new AccountInfo(
"accountAlias",
new QueueServiceClient("account_connection_string"),
CloudStorageAccount.Parse("account_connection_string").CreateCloudTableClient());
Use:
var transport = new AzureStorageQueueTransport(
new QueueServiceClient("connection_string"),
new BlobServiceClient("connection_string"),
new TableServiceClient("connection_string"));
var accountInfo = new AccountInfo(
"accountAlias",
new QueueServiceClient("account_connection_string"),
new TableServiceClient("account_connection_string"));
Configuring clients
Configuring clients for queue, blob or table is done via the constructor overload. Setting those via endpoint configuration methods is no longer possible.
Instead of:
var transport = endpointConfiguration.UseTransport<AzureStorageQueueTransport>();
transport.UseQueueServiceClient(new QueueServiceClient("connection_string"));
transport.UseBlobServiceClient(new BlobServiceClient("connection_string"));
transport.UseCloudTableClient(CloudStorageAccount.Parse("connection_string").CreateCloudTableClient());
// or
transport = endpointConfiguration.UseTransport<AzureStorageQueueTransport>(
new QueueServiceClient("connection_string"),
new BlobServiceClient("connection_string"),
CloudStorageAccount.Parse("connection_string").CreateCloudTableClient());
);
Use:
var transport = new AzureStorageQueueTransport(
new QueueServiceClient("connection_string"),
new BlobServiceClient("connection_string"),
new TableServiceClient("connection_string"));
Configuring account routings
Instead of:
var accountRouting = transport.AccountRouting();
accountRouting.AddAccount(
"accountAlias",
new QueueServiceClient("account_connection_string"),
CloudStorageAccount.Parse("account_connection_string").CreateCloudTableClient());
Use:
var accountRouting = transport.AccountRouting();
accountRouting.AddAccount(
"accountAlias",
new QueueServiceClient("account_connection_string"),
new TableServiceClient("account_connection_string"));