internal void EnsurePartitionKeyInEntityMatchesPartitionKey <T>(T entity, PartitionKey partitionKey) where T : CosmosEntity { if (!partitionKey.Equals(new PartitionKey(entity.PartitionKey))) { throw CreateCosmosClientException( $"Partition key extracted from entity {entity.PartitionKey} does not match given partition key {partitionKey}", HttpStatusCode.BadRequest); } }
public bool Equals(PartitionObjectKeyString other) { return(PartitionKey.Equals(other.PartitionKey) && Key == other.Key); }