Azure Storage Table – Cannot add user-defined property/field

When inserting records into Storage Tables in Azure the base columns are PartitionKey, RowKey and TimeStamp.

To ensure the other properties of your entity is also created in the storage you HAVE to define them as properties (with a GET and SET), otherwise it will not be created e.g.:

This will NOT create the properties in Azure Storage Table:

class Log: TableEntity
public DateTime Date;
public string Level ;
public string Logger;
public string Message;

But this WILL:

public DateTime Date;
public string Level { get; set; }
public string Logger { get; set; }
public string Message { get; set; }

Leave a Reply

Your email address will not be published. Required fields are marked *