Search code examples
azureazure-storageazure-table-storageazure-cosmosdb-tables

Entity interceptors in Azure.Data.Tables


In the new SDK package - Azure.Data.Tables, how can you intercept the calls done to table storage / cosmos. In the previous package (Microsoft.WindowsAzure.Storage) it could be done through the method IDictionary<string, EntityProperty> WriteEntity(OperationContext operationContext) or ReadEntity. But now it seems that no interceptor is available. Those were handy when we saved nullable types to Storage - for example int? or Guid?.


Solution

  • Azure.Data.Tables has no interceptor concept, however it also allows you to define entities with properties of type int? or Guid?. When adding an entity to the table, any null properties are omitted from the entity.