- ETags are for consistency checks for documentations that get updated. The audit documents are insert, and read only no updates.
- With Cosmos db for performance every query should include the partition key if possible. This means picking a key that most queries would know about. This is easy with the audit collection.
3…
- This is a standard trick for creating a constant, where the name of the constant matches it’s value.
private const string Meta = nameof(Meta);
Instead of
private const string Meta = “Meta”;
- The partition key column was named “PartitionKey”, and because it’s value can be generated from the model data, it is not included in the model as a property.