As of today (5th Nov 2019) there are two Table data storage options available in Azure,
- Azure Table Storage
- Azure Cosmos DB (formerly Document DB)
The intention for this post is only focusing on the different nuget packages available for these two offerings to access data.
The ancient one. This was used to access any Azure Storage offerings (Blobs, Tables, Files, Queues) since the introduction of Azure Storage accounts (you can still see the name “WindowAzure”). This works with both .NET Framework and .NET Core. From version 9.4.x this monolith was spit into 4 different sub packages, they are
As the names reflect, each of the packages doing their jobs well and first 3 packages are having a common dependency on the Microsoft.Azure.Storge.Common to perform common tasks (such as connecting to the storage service).
So, where is the so called Microsoft.Azure.Storage.Table for Table Storage?
“DocumentDB is dead, long live the Cosmos DB” was how the announcement came. DocumentDB is the ancestor for Cosmos DB, thus this Microsoft.Azure.DocumentDB package was used until very recent times and was the only option to access Cosmos DB as well. This can still be used to access Cosmos DB resources (SQL API only) via .NET Framework
This is the .NET Core version for the Microsoft.Azure.DocumentDB.
Currently in maintenance mode and soon to be dead package, this was the first package to deliver “Table API” experience to .NET Framework so using this you can access both Azure Table Storage and Azure Cosmos DB tables.
Replacing Microsoft.Azure.CosmosDB.Table, supporting .NET standard and gives you the ability to work on both Azure Table Storage and Cosmos DB tables (aka Azure Premium Tables). Even though this is the production ready package that can be used to target .NET standards and can be used with both Azure Table Storage and Azure Cosmos DB – this does not support the seamless experience between both Azure Table Storage and Azure Cosmos DB and require code changes.
The new kid in town – still in beta, no production ready yet (as of 20 March 2021 – make sure you tick “Include prerelease” option in nuget package manager in Visual Studio), you can use it at your own risk and contribute to its development. This supports .NET standard and and can seamlessly target either Azure Table storage or Azure Cosmos DB table service endpoints with no code changes.
|.NET Framework||.NET Core||Azure Table Storage||Azure Cosmos DB||Seamless targeting|