SqlServerMigrationsSqlGenerator.DefaultValue Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Generates a SQL fragment for the named default constraint of a column.
protected virtual void DefaultValue(object? defaultValue, string? defaultValueSql, string? columnType, string? constraintName, Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder builder);
override this.DefaultValue : obj * string * string * string * Microsoft.EntityFrameworkCore.Migrations.MigrationCommandListBuilder -> unit
Protected Overridable Sub DefaultValue (defaultValue As Object, defaultValueSql As String, columnType As String, constraintName 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.
- constraintName
- String
The constraint name to use to add the SQL fragment.
- builder
- MigrationCommandListBuilder
The command builder to use to add the SQL fragment.