Which Azure Table Storage .NET SDK should I use?

When working with Azure Table Storage (ATS) in C# / .NET there are currently at least four NuGet packages offered by Microsoft for working with tables. It gets even more complicated as there’s an Azure.Storage SDK (currently in Version 12) that works with all Azure Storage Account related services — except Table Storage. Additionally Microsoft mostly talks about the CosmosDB Table API, but all libraries also work with the regular ATS since the APIs are identical.

So what are our options and which one should I choose?

WindowsAzure.Storage

.NET Framework, deprecated

https://www.nuget.org/packages/WindowsAzure.Storage/

This is the now deprecated predecessor of the Microsoft.Azure.Storage (v11, also deprecated) and Azure.Storage (v12, current version) packages that were split up into individual nuget packages for each service (e.g. Blob, Queues, Files etc.) after v9.4. As the split happened, Microsoft also dropped support for Azure Table Storage in favor of the CosmosDB Table package(s).

Microsoft.Azure.CosmosDB.Table

.NET Framework, deprecated

https://www.nuget.org/packages/Microsoft.Azure.CosmosDB.Table/

As mentioned at the start both Azure Table Storage and CosmosDB support the same Table-API, meaning you can simply switch your connection string to switch between those two independent services. This .NET Framework-based package has since been replaced by the Microsoft.Azure.Cosmos.Table package (not the very subtile and potentially confusing difference in the namespace Cosmos vs CosmosDB).

Microsoft.Azure.Cosmos.Table

.NET Standard 2.0

https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Table

This .NET Standard-based rewrite of the CosmosDB Table SDK was the go-to package until just recently. Unfortunately it hasn’t seen any update for over a year now, but a lot of other helper packages like Serilog or the very helpful TableStorage.Abstractions are still based on this. If you’re currently using it, there’s at least for now no reason to switch. But if you are starting from scratch, I suggest you take a look at the last & newest option.

Azure.Data.Tables

.NET Standard 2.0, current

https://www.nuget.org/packages/Azure.Data.Tables/

This is Microsofts newest package for accessing Azure Table Storage. The Version 12 is now aligned again with the Microsft.Azure.Storage packages. Compared to the previous NuGet package it has some nice quality-of-life features like abstracting away the continuation token logic when querying multiple pages of entites. The concepts like AsyncEnumerables take a bit to get used to, but in the end it results in less & cleaner code on your end.

So, which NuGet package should I use?

In the end I’d recommend going with the new and shiny Azure.Data.Tables as this is the one to most likely receive future updates and perhaps more neat helper functionalities. If you rely on other packages like Serilog that are depending on Microsoft.Azure.Cosmos.Table you can still go for that one to keep dependency bloat at a minimum.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.