protected override void ValidateKey(PartitionedItemKey key) { base.ValidateKey(key); if (string.IsNullOrEmpty(key.PartitionKey)) { throw new ArgumentNullException(nameof(key.PartitionKey)); } if (string.IsNullOrEmpty(key.Id)) { throw new ArgumentNullException(nameof(key.Id)); } }
protected virtual PartitionedItemKey GetKeyFromEntity(TValue value) { var id = GetPropertyValue(value, "Id"); var partitionKeyValue = GetPropertyValue(value, GetPartitionKey()); var ky = new PartitionedItemKey { PartitionKey = partitionKeyValue, Id = id }; return(ky); }
protected virtual PartitionedItemKey GetKeyFromEntity(TValue value) { if (string.IsNullOrEmpty(value.Id)) { throw new ArgumentNullException(nameof(value.Id)); } var ky = new PartitionedItemKey { Id = value.Id, PartitionKey = GetPropertyValue(value, GetPartitionKey()) }; return(ky); }
protected override PartitionedItemKey GetKeyFromKey(PartitionedItemKey key) { return(key); }