Whenever inserting a new entity into Microsoft.WindowsAzure.Storage.Table.CloudTable it is mandatory to have both partition key and row key defined.
However in EntityTypeMap's AutoMap method the for check check whether entity's PartitionKey and RowKey completely defined performed as follows:
if (!_nameChanges.ContainsValue(PartitionKeyPropertyName) && !_nameChanges.ContainsValue(RowKeyPropertyName)) { var message = string.Format(Resources.EntityTypeDataMissingKey, _entityType); throw new InvalidOperationException(message); }
This check misses the case when user defines one of the keys and omits the other.
Whenever inserting a new entity into Microsoft.WindowsAzure.Storage.Table.CloudTable it is mandatory to have both partition key and row key defined.
However in EntityTypeMap's AutoMap method the for check check whether entity's PartitionKey and RowKey completely defined performed as follows:
if (!_nameChanges.ContainsValue(PartitionKeyPropertyName) && !_nameChanges.ContainsValue(RowKeyPropertyName)) { var message = string.Format(Resources.EntityTypeDataMissingKey, _entityType); throw new InvalidOperationException(message); }
This check misses the case when user defines one of the keys and omits the other.