示例#1
0
        private void ConfigurePartitionKeyJoinEntityType(IConventionSkipNavigation skipNavigation, IConventionEntityTypeBuilder joinEntityTypeBuilder)
        {
            var principalPartitionKey = skipNavigation.DeclaringEntityType.GetPartitionKeyProperty() !;
            var partitionKey          = joinEntityTypeBuilder.Property(principalPartitionKey.ClrType, principalPartitionKey.Name) !.Metadata;

            joinEntityTypeBuilder.HasPartitionKey(partitionKey.Name);

            CreateSkipNavigationForeignKey(skipNavigation, joinEntityTypeBuilder, partitionKey);
            CreateSkipNavigationForeignKey(skipNavigation.Inverse !, joinEntityTypeBuilder, partitionKey);
        }