SqlServerKeyBuilderExtensions SqlServerKeyBuilderExtensions Class

SQL Server specific extension methods for KeyBuilder.

Syntax

Declaration

public static class SqlServerKeyBuilderExtensionsPublic Module SqlServerKeyBuilderExtensions

Inheritance Hierarchy

  • System.Object
    System.Object
  • SqlServerKeyBuilderExtensions
    SqlServerKeyBuilderExtensions

Inherited Members

ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Methods summary

Configures the name of the key constraint in the database when targeting SQL Server.

Configures whether the key is clustered when targeting SQL Server.

Methods

  • ForSqlServerHasName(KeyBuilder, String)
    ForSqlServerHasName(KeyBuilder, String)

    Configures the name of the key constraint in the database when targeting SQL Server.

    public static KeyBuilder ForSqlServerHasName(this KeyBuilder keyBuilder, string name)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasName(keyBuilder As KeyBuilder, name As String) As KeyBuilder

    Parameters

    • keyBuilder

      The builder for the key being configured.

    • name
      System.String
      System.String

      The name of the key.

    Returns

  • ForSqlServerIsClustered(KeyBuilder, Boolean)
    ForSqlServerIsClustered(KeyBuilder, Boolean)

    Configures whether the key is clustered when targeting SQL Server.

    public static KeyBuilder ForSqlServerIsClustered(this KeyBuilder keyBuilder, bool clustered = true)<ExtensionAttribute>
    Public Shared Function ForSqlServerIsClustered(keyBuilder As KeyBuilder, clustered As Boolean = True) As KeyBuilder

    Parameters

    • keyBuilder

      The builder for the key being configured.

    • clustered
      System.Boolean
      System.Boolean

      A value indicating whether the key is clustered.

    Returns

Details

Assembly

Microsoft.EntityFrameworkCore.SqlServer.dll