IConventionKeyBuilder Interface

Definition

Provides a simple API surface for configuring an IConventionKey from conventions.

This interface is typically used by database providers (and other extensions). It is generally not used in application code.

public interface IConventionKeyBuilder : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionAnnotatableBuilder
type IConventionKeyBuilder = interface
    interface IConventionAnnotatableBuilder
Public Interface IConventionKeyBuilder
Implements IConventionAnnotatableBuilder
Implements

Properties

Metadata

Gets the key being configured.

ModelBuilder

Gets the model builder.

(Inherited from IConventionAnnotatableBuilder)

Methods

CanRemoveAnnotation(String, Boolean)

Returns a value indicating whether an annotation with the given name can be removed using this configuration source.

(Inherited from IConventionAnnotatableBuilder)
CanSetAnnotation(String, Object, Boolean)

Returns a value indicating whether an annotation with the given name and value can be set from this configuration source.

(Inherited from IConventionAnnotatableBuilder)
HasAnnotation(String, Object, Boolean)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists with same or lower ConfigurationSource.

(Inherited from IConventionAnnotatableBuilder)
HasNoAnnotation(String, Boolean)

Removes the annotation with the given name from this object.

(Inherited from IConventionAnnotatableBuilder)
HasNonNullAnnotation(String, Object, Boolean)

Sets the annotation stored under the given name. Overwrites the existing annotation if an annotation with the specified name already exists with same or lower ConfigurationSource. Removes the annotation if null value is specified.

(Inherited from IConventionAnnotatableBuilder)
RemoveAnnotation(String, Boolean)
Obsolete.

Removes the annotation with the given name from this object.

(Inherited from IConventionAnnotatableBuilder)
SetOrRemoveAnnotation(String, Object, Boolean)
Obsolete.

Sets or removes the annotation stored under the given name.

(Inherited from IConventionAnnotatableBuilder)

Extension Methods

CanSetName(IConventionKeyBuilder, String, Boolean)

Returns a value indicating whether the given name can be set for the key constraint.

HasName(IConventionKeyBuilder, String, Boolean)

Configures the name of the key constraint in the database when targeting a relational database.

CanSetIsClustered(IConventionKeyBuilder, Nullable<Boolean>, Boolean)

Returns a value indicating whether the key can be configured as clustered.

ForSqlServerIsClustered(IConventionKeyBuilder, Nullable<Boolean>, Boolean)
Obsolete.

Configures whether the key is clustered when targeting SQL Server.

IsClustered(IConventionKeyBuilder, Nullable<Boolean>, Boolean)

Configures whether the key is clustered when targeting SQL Server.

Applies to