Share via


MigrationsSqlGenerator.DefaultValue Method

Definition

Overloads

DefaultValue(Object, String, MigrationCommandListBuilder)

Generates a SQL fragment for the default constraint of a column.

DefaultValue(Object, String, String, MigrationCommandListBuilder)

Generates a SQL fragment for the default constraint of a column.

DefaultValue(Object, String, MigrationCommandListBuilder)

Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs

Generates a SQL fragment for the default constraint of a column.

protected virtual void DefaultValue (object defaultValue, string defaultValueSql, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member DefaultValue : obj * string * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.DefaultValue : obj * string * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub DefaultValue (defaultValue As Object, defaultValueSql As String, builder As MigrationCommandListBuilder)

Parameters

defaultValue
Object

The default value for the column.

defaultValueSql
String

The SQL expression to use for the column's default constraint.

builder
MigrationCommandListBuilder

The command builder to use to add the SQL fragment.

Applies to

DefaultValue(Object, String, String, MigrationCommandListBuilder)

Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs

Generates a SQL fragment for the default constraint of a column.

protected virtual void DefaultValue (object defaultValue, string defaultValueSql, string columnType, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
protected virtual void DefaultValue (object? defaultValue, string? defaultValueSql, string? columnType, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
abstract member DefaultValue : obj * string * string * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
override this.DefaultValue : obj * string * string * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub DefaultValue (defaultValue As Object, defaultValueSql As String, columnType As String, builder As MigrationCommandListBuilder)

Parameters

defaultValue
Object

The default value for the column.

defaultValueSql
String

The SQL expression to use for the column's default constraint.

columnType
String

Store/database type of the column.

builder
MigrationCommandListBuilder

The command builder to use to add the SQL fragment.

Applies to