SqlServerPropertyBuilderExtensions SqlServerPropertyBuilderExtensions Class

SQL Server specific extension methods for PropertyBuilder.

Syntax

Declaration

public static class SqlServerPropertyBuilderExtensionsPublic Module SqlServerPropertyBuilderExtensions

Inheritance Hierarchy

  • System.Object
    System.Object
  • SqlServerPropertyBuilderExtensions
    SqlServerPropertyBuilderExtensions

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 column that the property maps to when targeting SQL Server.

Configures the column that the property maps to when targeting SQL Server.

Configures the data type of the column that the property maps to when targeting SQL Server. This should be the complete type name, including precision, scale, length, etc.

Configures the data type of the column that the property maps to when targeting SQL Server. This should be the complete type name, including precision, scale, length, etc.

Configures the property to map to a computed column when targeting SQL Server.

Configures the property to map to a computed column when targeting SQL Server.

Configures the default value for the column that the property maps to when targeting SQL Server.

Configures the default value for the column that the property maps to when targeting SQL Server.

Configures the default value expression for the column that the property maps to when targeting SQL Server.

Configures the default value expression for the column that the property maps to when targeting SQL Server.

Configures the property to use a sequence-based hi-lo pattern to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

Configures the property to use a sequence-based hi-lo pattern to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

Configures the property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

Configures the property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

Methods

  • ForSqlServerHasColumnName(PropertyBuilder, String)
    ForSqlServerHasColumnName(PropertyBuilder, String)

    Configures the column that the property maps to when targeting SQL Server.

    public static PropertyBuilder ForSqlServerHasColumnName(this PropertyBuilder propertyBuilder, string name)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasColumnName(propertyBuilder As PropertyBuilder, name As String) As PropertyBuilder

    Parameters

    • propertyBuilder

      The builder for the property being configured.

    • name
      System.String
      System.String

      The name of the column.

    Returns

  • ForSqlServerHasColumnName<TProperty>(PropertyBuilder<TProperty>, String)
    ForSqlServerHasColumnName(Of TProperty)(PropertyBuilder(Of TProperty), String)

    Configures the column that the property maps to when targeting SQL Server.

    public static PropertyBuilder<TProperty> ForSqlServerHasColumnName<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, string name)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasColumnName(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), name As String) As PropertyBuilder(Of TProperty)

    Parameters

    Returns

  • ForSqlServerHasColumnType(PropertyBuilder, String)
    ForSqlServerHasColumnType(PropertyBuilder, String)

    Configures the data type of the column that the property maps to when targeting SQL Server. This should be the complete type name, including precision, scale, length, etc.

    public static PropertyBuilder ForSqlServerHasColumnType(this PropertyBuilder propertyBuilder, string typeName)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasColumnType(propertyBuilder As PropertyBuilder, typeName As String) As PropertyBuilder

    Parameters

    • propertyBuilder

      The builder for the property being configured.

    • typeName
      System.String
      System.String

      The name of the data type of the column.

    Returns

  • ForSqlServerHasColumnType<TProperty>(PropertyBuilder<TProperty>, String)
    ForSqlServerHasColumnType(Of TProperty)(PropertyBuilder(Of TProperty), String)

    Configures the data type of the column that the property maps to when targeting SQL Server. This should be the complete type name, including precision, scale, length, etc.

    public static PropertyBuilder<TProperty> ForSqlServerHasColumnType<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, string typeName)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasColumnType(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), typeName As String) As PropertyBuilder(Of TProperty)

    Parameters

    Returns

  • ForSqlServerHasComputedColumnSql(PropertyBuilder, String)
    ForSqlServerHasComputedColumnSql(PropertyBuilder, String)

    Configures the property to map to a computed column when targeting SQL Server.

    public static PropertyBuilder ForSqlServerHasComputedColumnSql(this PropertyBuilder propertyBuilder, string sql)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasComputedColumnSql(propertyBuilder As PropertyBuilder, sql As String) As PropertyBuilder

    Parameters

    • propertyBuilder

      The builder for the property being configured.

    • sql
      System.String
      System.String

      The SQL expression that computes values for the column.

    Returns

  • ForSqlServerHasComputedColumnSql<TProperty>(PropertyBuilder<TProperty>, String)
    ForSqlServerHasComputedColumnSql(Of TProperty)(PropertyBuilder(Of TProperty), String)

    Configures the property to map to a computed column when targeting SQL Server.

    public static PropertyBuilder<TProperty> ForSqlServerHasComputedColumnSql<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, string sql)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasComputedColumnSql(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), sql As String) As PropertyBuilder(Of TProperty)

    Parameters

    Returns

  • ForSqlServerHasDefaultValue(PropertyBuilder, Object)
    ForSqlServerHasDefaultValue(PropertyBuilder, Object)

    Configures the default value for the column that the property maps to when targeting SQL Server.

    public static PropertyBuilder ForSqlServerHasDefaultValue(this PropertyBuilder propertyBuilder, object value)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasDefaultValue(propertyBuilder As PropertyBuilder, value As Object) As PropertyBuilder

    Parameters

    • propertyBuilder

      The builder for the property being configured.

    • value
      System.Object
      System.Object

      The default value of the column.

    Returns

  • ForSqlServerHasDefaultValue<TProperty>(PropertyBuilder<TProperty>, Object)
    ForSqlServerHasDefaultValue(Of TProperty)(PropertyBuilder(Of TProperty), Object)

    Configures the default value for the column that the property maps to when targeting SQL Server.

    public static PropertyBuilder<TProperty> ForSqlServerHasDefaultValue<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, object value)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasDefaultValue(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), value As Object) As PropertyBuilder(Of TProperty)

    Parameters

    Returns

  • ForSqlServerHasDefaultValueSql(PropertyBuilder, String)
    ForSqlServerHasDefaultValueSql(PropertyBuilder, String)

    Configures the default value expression for the column that the property maps to when targeting SQL Server.

    public static PropertyBuilder ForSqlServerHasDefaultValueSql(this PropertyBuilder propertyBuilder, string sql)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasDefaultValueSql(propertyBuilder As PropertyBuilder, sql As String) As PropertyBuilder

    Parameters

    • propertyBuilder

      The builder for the property being configured.

    • sql
      System.String
      System.String

      The SQL expression for the default value of the column.

    Returns

  • ForSqlServerHasDefaultValueSql<TProperty>(PropertyBuilder<TProperty>, String)
    ForSqlServerHasDefaultValueSql(Of TProperty)(PropertyBuilder(Of TProperty), String)

    Configures the default value expression for the column that the property maps to when targeting SQL Server.

    public static PropertyBuilder<TProperty> ForSqlServerHasDefaultValueSql<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, string sql)<ExtensionAttribute>
    Public Shared Function ForSqlServerHasDefaultValueSql(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), sql As String) As PropertyBuilder(Of TProperty)

    Parameters

    Returns

  • ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)
    ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

    Configures the property to use a sequence-based hi-lo pattern to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

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

    Parameters

    • propertyBuilder

      The builder for the property being configured.

    • name
      System.String
      System.String

      The name of the sequence.

    • schema
      System.String
      System.String

      The schema of the sequence.

    Returns

  • ForSqlServerUseSequenceHiLo<TProperty>(PropertyBuilder<TProperty>, String, String)
    ForSqlServerUseSequenceHiLo(Of TProperty)(PropertyBuilder(Of TProperty), String, String)

    Configures the property to use a sequence-based hi-lo pattern to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

    public static PropertyBuilder<TProperty> ForSqlServerUseSequenceHiLo<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, string name = null, string schema = null)<ExtensionAttribute>
    Public Shared Function ForSqlServerUseSequenceHiLo(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), name As String = Nothing, schema As String = Nothing) As PropertyBuilder(Of TProperty)

    Parameters

    • propertyBuilder

      The builder for the property being configured.

    • name
      System.String
      System.String

      The name of the sequence.

    • schema
      System.String
      System.String

      The schema of the sequence.

    Returns

  • UseSqlServerIdentityColumn(PropertyBuilder)
    UseSqlServerIdentityColumn(PropertyBuilder)

    Configures the property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

    public static PropertyBuilder UseSqlServerIdentityColumn(this PropertyBuilder propertyBuilder)<ExtensionAttribute>
    Public Shared Function UseSqlServerIdentityColumn(propertyBuilder As PropertyBuilder) As PropertyBuilder

    Parameters

    Returns

  • UseSqlServerIdentityColumn<TProperty>(PropertyBuilder<TProperty>)
    UseSqlServerIdentityColumn(Of TProperty)(PropertyBuilder(Of TProperty))

    Configures the property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.

    public static PropertyBuilder<TProperty> UseSqlServerIdentityColumn<TProperty>(this PropertyBuilder<TProperty> propertyBuilder)<ExtensionAttribute>
    Public Shared Function UseSqlServerIdentityColumn(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty)) As PropertyBuilder(Of TProperty)

    Parameters

    Returns

Details

Assembly

Microsoft.EntityFrameworkCore.SqlServer.dll