语言

RelationalPropertyExtensions.SetDefaultValue 方法

定义

重载

名称 说明
SetDefaultValue(IMutableProperty, Object)

设置用作此属性映射到的列的默认值的对象。

SetDefaultValue(IConventionProperty, Object, Boolean)

设置用作此属性映射到的列的默认值的对象。

SetDefaultValue(IMutableProperty, Object)

Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs

设置用作此属性映射到的列的默认值的对象。

public static void SetDefaultValue(this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, object? value);
public static void SetDefaultValue(this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, object value);
static member SetDefaultValue : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * obj -> unit
<Extension()>
Public Sub SetDefaultValue (property As IMutableProperty, value As Object)

参数

property
IMutableProperty

属性。

value
Object

要设置的值。

适用于

SetDefaultValue(IConventionProperty, Object, Boolean)

Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs
Source:
RelationalPropertyExtensions.cs

设置用作此属性映射到的列的默认值的对象。

public static object? SetDefaultValue(this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, object? value, bool fromDataAnnotation = false);
public static void SetDefaultValue(this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, object value, bool fromDataAnnotation = false);
public static object SetDefaultValue(this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, object value, bool fromDataAnnotation = false);
static member SetDefaultValue : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * obj * bool -> obj
static member SetDefaultValue : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * obj * bool -> unit
<Extension()>
Public Function SetDefaultValue (property As IConventionProperty, value As Object, Optional fromDataAnnotation As Boolean = false) As Object
<Extension()>
Public Sub SetDefaultValue (property As IConventionProperty, value As Object, Optional fromDataAnnotation As Boolean = false)

参数

property
IConventionProperty

属性。

value
Object

要设置的值。

fromDataAnnotation
Boolean

指示是否使用数据注释指定了配置。

返回

配置的值。

适用于