Partilhar via


RelationalKeyDiscoveryConvention Class

Definition

A relational-specific convention inheriting from KeyDiscoveryConvention.

public class RelationalKeyDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.KeyDiscoveryConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention
type RelationalKeyDiscoveryConvention = class
    inherit KeyDiscoveryConvention
    interface IEntityTypeAnnotationChangedConvention
    interface IConvention
Public Class RelationalKeyDiscoveryConvention
Inherits KeyDiscoveryConvention
Implements IEntityTypeAnnotationChangedConvention
Inheritance
RelationalKeyDiscoveryConvention
Implements

Remarks

See Model building conventions for more information and examples.

Constructors

RelationalKeyDiscoveryConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

Creates a new instance of RelationalKeyDiscoveryConvention.

Fields

SynthesizedOrdinalPropertyName

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Properties

Dependencies

Dependencies for this service.

(Inherited from KeyDiscoveryConvention)
RelationalDependencies

Relational provider-specific dependencies for this service.

Methods

DiscoverKeyProperties(IConventionEntityType)

Returns the properties that should be used for the primary key.

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Called after an entity type is added to the model.

(Inherited from KeyDiscoveryConvention)
ProcessEntityTypeAnnotationChanged(IConventionEntityTypeBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

Called after an annotation is changed on an entity type.

ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

Called after the base type of an entity type changes.

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

Called after an entity type member is ignored.

(Inherited from KeyDiscoveryConvention)
ProcessForeignKeyAdded(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Called after a foreign key is added to the entity type.

(Inherited from KeyDiscoveryConvention)
ProcessForeignKeyAdded(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Called after a foreign key is added to the entity type.

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

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

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

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

(Inherited from KeyDiscoveryConvention)
ProcessForeignKeyPropertiesChanged(IConventionForeignKeyBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IReadOnlyList<IConventionProperty>>)

Called after the foreign key properties or principal key are changed.

(Inherited from KeyDiscoveryConvention)
ProcessForeignKeyPropertiesChanged(IConventionRelationshipBuilder, IReadOnlyList<IConventionProperty>, IConventionKey, IConventionContext<IConventionRelationshipBuilder>)

Called after the foreign key properties or principal key are changed.

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

Called after a foreign key is removed.

(Inherited from KeyDiscoveryConvention)
ProcessForeignKeyUniquenessChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

Called after the uniqueness for a foreign key is changed.

(Inherited from KeyDiscoveryConvention)
ProcessForeignKeyUniquenessChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

Called after the uniqueness for a foreign key is changed.

(Inherited from KeyDiscoveryConvention)
ProcessKeyProperties(IList<IConventionProperty>, IConventionEntityType)

Adds or removes properties to be used for the primary key.

ProcessKeyRemoved(IConventionEntityTypeBuilder, IConventionKey, IConventionContext<IConventionKey>)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

(Inherited from KeyDiscoveryConvention)
ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Called after a property is added to the entity type.

ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Called after the backing field for a property is changed.

(Inherited from KeyDiscoveryConvention)
ProcessSkipNavigationForeignKeyChanged(IConventionSkipNavigationBuilder, IConventionForeignKey, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

Called after a skip navigation inverse is changed.

(Inherited from KeyDiscoveryConvention)
ShouldDiscoverKeyProperties(IConventionEntityType)

Determines whether key properties should be discovered for the entity type.

(Inherited from KeyDiscoveryConvention)
TryConfigurePrimaryKey(IConventionEntityTypeBuilder)

Discovers primary key candidates and configures the primary key if found.

(Inherited from KeyDiscoveryConvention)

Applies to