SqlServerModelBuilderExtensions SqlServerModelBuilderExtensions Class

SQL Server specific extension methods for ModelBuilder.

Syntax

Declaration

public static class SqlServerModelBuilderExtensionsPublic Module SqlServerModelBuilderExtensions

Inheritance Hierarchy

  • System.Object
    System.Object
  • SqlServerModelBuilderExtensions
    SqlServerModelBuilderExtensions

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 a database sequence when targeting SQL Server.

Configures a database sequence when targeting SQL Server.

Configures a database sequence when targeting SQL Server.

Configures a database sequence when targeting SQL Server.

Configures a database sequence when targeting SQL Server.

Configures a database sequence when targeting SQL Server.

Configures a database sequence when targeting SQL Server.

Configures a database sequence when targeting SQL Server.

Configures a database sequence when targeting SQL Server.

Configures the model to use the SQL Server IDENTITY feature to generate values for properties marked as OnAdd, when targeting SQL Server. This is the default behavior when targeting SQL Server.

Configures the model to use a sequence-based hi-lo pattern to generate values for properties marked as OnAdd, when targeting SQL Server.

Methods

  • ForSqlServerHasSequence(ModelBuilder, String, Action<RelationalSequenceBuilder>)
    ForSqlServerHasSequence(ModelBuilder, String, Action(Of RelationalSequenceBuilder))

    Configures a database sequence when targeting SQL Server.

    public static ModelBuilder ForSqlServerHasSequence(this ModelBuilder modelBuilder, string name, Action<RelationalSequenceBuilder> builderAction)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasSequence(modelBuilder As ModelBuilder, name As String, builderAction As Action(Of RelationalSequenceBuilder)) As ModelBuilder

    Parameters

    Returns

  • ForSqlServerHasSequence(ModelBuilder, String, String)
    ForSqlServerHasSequence(ModelBuilder, String, String)

    Configures a database sequence when targeting SQL Server.

    public static RelationalSequenceBuilder ForSqlServerHasSequence(this ModelBuilder modelBuilder, string name, string schema = null)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasSequence(modelBuilder As ModelBuilder, name As String, schema As String = Nothing) As RelationalSequenceBuilder

    Parameters

    • modelBuilder

      The model builder.

    • name
      System.String
      System.String

      The name of the sequence.

    • schema
      System.String
      System.String

      The schema of the sequence.

    Returns

  • ForSqlServerHasSequence(ModelBuilder, String, String, Action<RelationalSequenceBuilder>)
    ForSqlServerHasSequence(ModelBuilder, String, String, Action(Of RelationalSequenceBuilder))

    Configures a database sequence when targeting SQL Server.

    public static ModelBuilder ForSqlServerHasSequence(this ModelBuilder modelBuilder, string name, string schema, Action<RelationalSequenceBuilder> builderAction)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasSequence(modelBuilder As ModelBuilder, name As String, schema As String, builderAction As Action(Of RelationalSequenceBuilder)) As ModelBuilder

    Parameters

    Returns

  • ForSqlServerHasSequence(ModelBuilder, Type, String, Action<RelationalSequenceBuilder>)
    ForSqlServerHasSequence(ModelBuilder, Type, String, Action(Of RelationalSequenceBuilder))

    Configures a database sequence when targeting SQL Server.

    public static ModelBuilder ForSqlServerHasSequence(this ModelBuilder modelBuilder, Type clrType, string name, Action<RelationalSequenceBuilder> builderAction)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasSequence(modelBuilder As ModelBuilder, clrType As Type, name As String, builderAction As Action(Of RelationalSequenceBuilder)) As ModelBuilder

    Parameters

    Returns

  • ForSqlServerHasSequence(ModelBuilder, Type, String, String)
    ForSqlServerHasSequence(ModelBuilder, Type, String, String)

    Configures a database sequence when targeting SQL Server.

    public static RelationalSequenceBuilder ForSqlServerHasSequence(this ModelBuilder modelBuilder, Type clrType, string name, string schema = null)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasSequence(modelBuilder As ModelBuilder, clrType As Type, name As String, schema As String = Nothing) As RelationalSequenceBuilder

    Parameters

    • modelBuilder

      The model builder.

    • clrType
      System.Type
      System.Type

      The type of values the sequence will generate.

    • name
      System.String
      System.String

      The name of the sequence.

    • schema
      System.String
      System.String

      The schema of the sequence.

    Returns

  • ForSqlServerHasSequence(ModelBuilder, Type, String, String, Action<RelationalSequenceBuilder>)
    ForSqlServerHasSequence(ModelBuilder, Type, String, String, Action(Of RelationalSequenceBuilder))

    Configures a database sequence when targeting SQL Server.

    public static ModelBuilder ForSqlServerHasSequence(this ModelBuilder modelBuilder, Type clrType, string name, string schema, Action<RelationalSequenceBuilder> builderAction)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasSequence(modelBuilder As ModelBuilder, clrType As Type, name As String, schema As String, builderAction As Action(Of RelationalSequenceBuilder)) As ModelBuilder

    Parameters

    • modelBuilder

      The model builder.

    • clrType
      System.Type
      System.Type

      The type of values the sequence will generate.

    • name
      System.String
      System.String

      The name of the sequence.

    • schema
      System.String
      System.String

      The schema of the sequence.

    • builderAction
      System.Action<T><RelationalSequenceBuilder>
      System.Action<T>(Of RelationalSequenceBuilder)

      An action that performs configuration of the sequence.

    Returns

  • ForSqlServerHasSequence<T>(ModelBuilder, String, Action<RelationalSequenceBuilder>)
    ForSqlServerHasSequence(Of T)(ModelBuilder, String, Action(Of RelationalSequenceBuilder))

    Configures a database sequence when targeting SQL Server.

    public static ModelBuilder ForSqlServerHasSequence<T>(this ModelBuilder modelBuilder, string name, Action<RelationalSequenceBuilder> builderAction)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasSequence(Of T)(modelBuilder As ModelBuilder, name As String, builderAction As Action(Of RelationalSequenceBuilder)) As ModelBuilder

    Parameters

    Returns

  • ForSqlServerHasSequence<T>(ModelBuilder, String, String)
    ForSqlServerHasSequence(Of T)(ModelBuilder, String, String)

    Configures a database sequence when targeting SQL Server.

    public static RelationalSequenceBuilder ForSqlServerHasSequence<T>(this ModelBuilder modelBuilder, string name, string schema = null)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasSequence(Of T)(modelBuilder As ModelBuilder, name As String, schema As String = Nothing) As RelationalSequenceBuilder

    Parameters

    • modelBuilder

      The model builder.

    • name
      System.String
      System.String

      The name of the sequence.

    • schema
      System.String
      System.String

      The schema of the sequence.

    Returns

  • ForSqlServerHasSequence<T>(ModelBuilder, String, String, Action<RelationalSequenceBuilder>)
    ForSqlServerHasSequence(Of T)(ModelBuilder, String, String, Action(Of RelationalSequenceBuilder))

    Configures a database sequence when targeting SQL Server.

    public static ModelBuilder ForSqlServerHasSequence<T>(this ModelBuilder modelBuilder, string name, string schema, Action<RelationalSequenceBuilder> builderAction)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasSequence(Of T)(modelBuilder As ModelBuilder, name As String, schema As String, builderAction As Action(Of RelationalSequenceBuilder)) As ModelBuilder

    Parameters

    Returns

  • ForSqlServerUseIdentityColumns(ModelBuilder)
    ForSqlServerUseIdentityColumns(ModelBuilder)

    Configures the model to use the SQL Server IDENTITY feature to generate values for properties marked as OnAdd, when targeting SQL Server. This is the default behavior when targeting SQL Server.

    public static ModelBuilder ForSqlServerUseIdentityColumns(this ModelBuilder modelBuilder)<ExtensionAttribute>
    Public Shared Function ForSqlServerUseIdentityColumns(modelBuilder As ModelBuilder) As ModelBuilder

    Parameters

    Returns

  • ForSqlServerUseSequenceHiLo(ModelBuilder, String, String)
    ForSqlServerUseSequenceHiLo(ModelBuilder, String, String)

    Configures the model to use a sequence-based hi-lo pattern to generate values for properties marked as OnAdd, when targeting SQL Server.

    public static ModelBuilder ForSqlServerUseSequenceHiLo(this ModelBuilder modelBuilder, string name = null, string schema = null)<ExtensionAttribute>
    Public Shared Function ForSqlServerUseSequenceHiLo(modelBuilder As ModelBuilder, name As String = Nothing, schema As String = Nothing) As ModelBuilder

    Parameters

    • modelBuilder

      The model builder.

    • name
      System.String
      System.String

      The name of the sequence.

    • schema
      System.String
      System.String

      The schema of the sequence.

    Returns

Details

Assembly

Microsoft.EntityFrameworkCore.SqlServer.dll