What is the relevance of the DynamicTableEntity class?

Viewed 95

  • Is there a difference between TableEntity and DynamicTableEntity?

  • I read articles but still don't understand the relevance: Azure.Data.Tables v12 doesn't have a class DynamicTableEntity under Azure.Data.Tables.

  • Is there any equivalent class that I can use for the same for the migration?

1 Answers

I am facing the same issue with my code. While reading the Microsoft docs, I found this description of the TableEntity type. The Azure.Data.Tables TableEntity class is:

A generic dictionary-like ITableEntity type which defines an arbitrary set of properties on an entity as key-value pairs.

This appears to be the replacement for DynamicTableEntity. Furthermore, it implements:

ITableEntity, ICollection<KeyValuePair<String,Object>>, ICollection<KeyValuePair<TKey,TValue>>, IDictionary<String,Object>, IEnumerable<KeyValuePair<String,Object>>, IEnumerable<KeyValuePair<TKey,TValue>>, IEnumerable, IEnumerable

Also, it has type conversion helper methods that can be used in place of the former EntityProperty helper methods.

https://docs.microsoft.com/en-us/dotnet/api/azure.data.tables.tableentity?view=azure-dotnet

Related