语言

RelationalPropertyExtensions.TryGetDefaultValue 方法

定义

重载

名称 说明
TryGetDefaultValue(IReadOnlyProperty, Object)

返回用作此属性所映射到列的默认值的对象。

TryGetDefaultValue(IReadOnlyProperty, StoreObjectIdentifier, Object)

返回用作此属性所映射到列的默认值的对象。

TryGetDefaultValue(IReadOnlyProperty, Object)

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

返回用作此属性所映射到列的默认值的对象。

public static bool TryGetDefaultValue(this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property, out object? defaultValue);
static member TryGetDefaultValue : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty * obj -> bool
<Extension()>
Public Function TryGetDefaultValue (property As IReadOnlyProperty, ByRef defaultValue As Object) As Boolean

参数

property
IReadOnlyProperty

属性。

defaultValue
Object

默认值;如果未设置显式默认值,则为 CLR 默认值。

返回

true 如果显式设置了默认值,则为 ; false 否则。

适用于

TryGetDefaultValue(IReadOnlyProperty, StoreObjectIdentifier, Object)

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

返回用作此属性所映射到列的默认值的对象。

public static bool TryGetDefaultValue(this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject, out object? defaultValue);
static member TryGetDefaultValue : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty * StoreObjectIdentifier * obj -> bool
<Extension()>
Public Function TryGetDefaultValue (property As IReadOnlyProperty, ByRef storeObject As StoreObjectIdentifier, ByRef defaultValue As Object) As Boolean

参数

property
IReadOnlyProperty

属性。

storeObject
StoreObjectIdentifier

包含列的类似表的存储对象的标识符。

defaultValue
Object

默认值;如果未设置显式默认值,则为 CLR 默认值。

返回

true 如果显式设置了默认值,则为 ; false 否则。

适用于