MigrationsSqlGenerator.DefaultValue 方法

定义

重载

DefaultValue(Object, String, MigrationCommandListBuilder)

为列的默认约束生成 SQL 片段。

DefaultValue(Object, String, String, MigrationCommandListBuilder)

为列的默认约束生成 SQL 片段。

DefaultValue(Object, String, MigrationCommandListBuilder)

Source:
MigrationsSqlGenerator.cs
Source:
MigrationsSqlGenerator.cs

为列的默认约束生成 SQL 片段。

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)

参数

defaultValue
Object

列的默认值。

defaultValueSql
String

要用于列的默认约束的 SQL 表达式。

builder
MigrationCommandListBuilder

用于添加 SQL 片段的命令生成器。

适用于

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

为列的默认约束生成 SQL 片段。

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)

参数

defaultValue
Object

列的默认值。

defaultValueSql
String

要用于列的默认约束的 SQL 表达式。

columnType
String

列的存储/数据库类型。

builder
MigrationCommandListBuilder

用于添加 SQL 片段的命令生成器。

适用于