Adding entities to a table
After creating the table, Weather
, we need to populate it with entities. In the .NET library, entities are mapped to C# objects. The library defines the ITableEntity
interface which should be implemented by all classes representing entities.
The ITableEntity
interface defines the following properties:
PartitionKey
: It is a string for the partition key of the an entityRowKey
: It is a string for the row keyTimestamp
: It is aDateTime
offset for the last update on the entityETag
: It is an entity tag for managing concurrency
The library also contains two classes that implement ITableEntity
.
The TableEntity
is a base class that can be inherited by custom classes. The DynamicTableEntity
is a class that holds an IDictionary<String,EntityProperty>
property named Properties
that is used to store properties inside it.
Now, let's define our custom entity by inheriting from the TableEntity
base class:
public class WeatherEntity : TableEntity { public WeatherEntity...