KeyBuilder KeyBuilder Class

Definition

Provides a simple API for configuring a Key.

Instances of this class are returned from methods when using the ModelBuilder API and it is not designed to be directly constructed in your application code.

public class KeyBuilder : IInfrastructure<IMutableModel>, IInfrastructure<InternalKeyBuilder>
Public Class KeyBuilder
    Implements IInfrastructure(Of IMutableModel), IInfrastructure(Of InternalKeyBuilder)
Inheritance
System.ObjectSystem.Object
KeyBuilderKeyBuilder
Implements

Constructors

KeyBuilder(InternalKeyBuilder) KeyBuilder(InternalKeyBuilder)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

Properties

Metadata Metadata

The key being configured.

Methods

System.Object.Equals(System.Object) System.Object.Equals(System.Object) Inherited from System.Object
System.Object.Equals(System.Object, System.Object) System.Object.Equals(System.Object, System.Object) Inherited from System.Object
System.Object.GetHashCode() System.Object.GetHashCode() Inherited from System.Object
System.Object.GetType() System.Object.GetType() Inherited from System.Object
HasAnnotation(String, Object) HasAnnotation(String, Object)

Adds or updates an annotation on the key. If an annotation with the key specified in annotation already exists it's value will be updated.

System.Object.MemberwiseClone() System.Object.MemberwiseClone() Inherited from System.Object
System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) Inherited from System.Object
System.Object.ToString() System.Object.ToString() Inherited from System.Object

Explicit Interface Implementations

IInfrastructure<IMutableModel>.Instance Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.IMutableModel>.Instance

The model that the key belongs to.

IInfrastructure<InternalKeyBuilder>.Instance Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Internal.InternalKeyBuilder>.Instance

The internal builder being used to configure the key.

Extension Methods

Microsoft.EntityFrameworkCore.SqlServerKeyBuilderExtensions.ForSqlServerHasName(System.String) Microsoft.EntityFrameworkCore.SqlServerKeyBuilderExtensions.ForSqlServerHasName(System.String)
Microsoft.EntityFrameworkCore.SqlServerKeyBuilderExtensions.ForSqlServerIsClustered(System.Boolean) Microsoft.EntityFrameworkCore.SqlServerKeyBuilderExtensions.ForSqlServerIsClustered(System.Boolean)
Microsoft.EntityFrameworkCore.SqliteKeyBuilderExtensions.ForSqliteHasName(System.String) Microsoft.EntityFrameworkCore.SqliteKeyBuilderExtensions.ForSqliteHasName(System.String)
Microsoft.EntityFrameworkCore.RelationalKeyBuilderExtensions.HasName(System.String) Microsoft.EntityFrameworkCore.RelationalKeyBuilderExtensions.HasName(System.String)