A Better Dynamic TableServiceEntity
When working with Azure Table Storage the recommended class to use is the provided TableServiceEntity class. This abstract class is designed to be inherited from in the data class which then requires the implementation of PartitionKey, RowKey and the addition of the attribute DataServiceKey which tells the underlying persistence system which properties map to those mandatory Azure Table Storage columns; like this:
[DataServiceKey(“PartitionKey”, “RowKey”)]
public class DomainClass : TableServiceEntity
{
public DomainClass(): base(“PartitionKey”, “1”)
{
}
public string PropertyOne { get; set; }
public string PropertyTwo { get; set; }
}
There are plenty of blogs on the .NET… [Keep reading] “A Better Dynamic TableServiceEntity”