共用方式為


CosmosRelationshipDiscoveryConvention Class

Definition

A convention that configures relationships between entity types based on the navigation properties as long as there is no ambiguity as to which is the corresponding inverse navigation. All navigations are assumed to be targeting owned entity types for Cosmos.

public class CosmosRelationshipDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.RelationshipDiscoveryConvention
type CosmosRelationshipDiscoveryConvention = class
    inherit RelationshipDiscoveryConvention
Public Class CosmosRelationshipDiscoveryConvention
Inherits RelationshipDiscoveryConvention
Inheritance
CosmosRelationshipDiscoveryConvention

Remarks

See Model building conventions, and Accessing Azure Cosmos DB with EF Core for more information and examples.

Constructors

CosmosRelationshipDiscoveryConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of RelationshipDiscoveryConvention.

Properties

Dependencies

Dependencies for this service.

(Inherited from RelationshipDiscoveryConvention)
UseAttributes

A value indicating whether the convention will use attributes found on the members.

(Inherited from RelationshipDiscoveryConvention)

Methods

DiscoverRelationships(IConventionEntityTypeBuilder, IConventionContext, Boolean)

Discovers the relationships for the given entity type.

(Inherited from RelationshipDiscoveryConvention)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Called after an entity type is added to the model.

(Inherited from RelationshipDiscoveryConvention)
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

Called after the base type of an entity type changes.

(Inherited from RelationshipDiscoveryConvention)
ProcessEntityTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

Called after an entity type is ignored.

(Inherited from RelationshipDiscoveryConvention)
ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

Called after an entity type member is ignored.

(Inherited from RelationshipDiscoveryConvention)
ProcessForeignKeyNullNavigationSet(IConventionForeignKeyBuilder, Boolean, IConventionContext<IConventionNavigation>)

Called after a navigation is set to null on a foreign key.

(Inherited from RelationshipDiscoveryConvention)
ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

Called after the ownership value for a foreign key is changed.

(Inherited from RelationshipDiscoveryConvention)
ProcessForeignKeyOwnershipChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Called after the ownership value for a foreign key is changed.

(Inherited from RelationshipDiscoveryConvention)
ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Called after a foreign key is removed.

(Inherited from RelationshipDiscoveryConvention)
ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

Called after a navigation is added to the entity type.

(Inherited from RelationshipDiscoveryConvention)
ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>)

Called after a navigation is added to the entity type.

(Inherited from RelationshipDiscoveryConvention)
ProcessNavigationRemoved(IConventionEntityTypeBuilder, IConventionEntityTypeBuilder, String, MemberInfo, IConventionContext<String>)

Called after a navigation is removed from the entity type.

(Inherited from RelationshipDiscoveryConvention)
ProcessTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

Called after an entity type is ignored.

(Inherited from RelationshipDiscoveryConvention)
ShouldBeOwned(Type, IConventionModel)

Returns a value indicating whether the given entity type should be added as owned if it isn't currently in the model.

ShouldBeOwnedType(Type, IConventionModel)

Returns a value indicating whether the given entity type should be added as owned if it isn't currently in the model.

TryGetTargetEntityTypeBuilder(IConventionEntityTypeBuilder, Type, MemberInfo, Nullable<Boolean>, Boolean)

Finds or tries to create an entity type target for the given navigation member.

(Inherited from RelationshipDiscoveryConvention)

Applies to