Google+

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

Leave a comment

November 22, 2016 by Ruaan Harmzen

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; }
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: