Esempio n. 1
0
        /// <inheritdoc />
        public InternalRelationshipBuilder Apply(InternalRelationshipBuilder relationshipBuilder)
        {
            Check.NotNull(relationshipBuilder, nameof(relationshipBuilder));

            IEntityType principalEntityType = relationshipBuilder.Metadata.PrincipalEntityType;

            bool principalIsOwned = principalEntityType.IsOwned() ||
                                    principalEntityType.MongoDb().IsComplexType;

            if (principalIsOwned)
            {
                relationshipBuilder.IsOwnership(true, ConfigurationSource.Explicit);
            }

            return(relationshipBuilder);
        }