Open xaviersolau opened 4 years ago
I would like to use other properties as partition key for cosmos store but it looks like it is hard coded in CosmosDomainDbContext :
CosmosDomainDbContext
builder.Entity<AggregateEntity>() .ToContainer(_settings.AggregateContainerName) .HasPartitionKey(p => p.Type) .HasNoDiscriminator(); builder.Entity<CommandEntity>() .ToContainer(_settings.CommandContainerName) .HasPartitionKey(p => p.Type) .HasNoDiscriminator(); builder.Entity<EventEntity>() .ToContainer(_settings.EventContainerName) .HasPartitionKey(p => p.Type) .HasNoDiscriminator();
Any idea ? By the way why did you chose the Type as partition key? Why not the AggregateId for example?
Type
You are right, the AggregateId would have been the right choice. Unfortunately it's not possible at the moment but in the mean time you can create a custom provider to address that.
I would like to use other properties as partition key for cosmos store but it looks like it is hard coded in
CosmosDomainDbContext
:Any idea ? By the way why did you chose the
Type
as partition key? Why not the AggregateId for example?