RelationalPropertyExtensions.TryGetDefaultValue Method

Definition

Overloads

TryGetDefaultValue(IReadOnlyProperty, Object)

Returns the object that is used as the default value for the column this property is mapped to.

TryGetDefaultValue(IReadOnlyProperty, StoreObjectIdentifier, Object)

Returns the object that is used as the default value for the column this property is mapped to.

TryGetDefaultValue(IReadOnlyProperty, Object)

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

Returns the object that is used as the default value for the column this property is mapped to.

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

Parameters

property
IReadOnlyProperty

The property.

defaultValue
Object

The default value, or the CLR default if no explicit default has been set.

Returns

true if a default value has been explicitly set; false otherwise.

Applies to

TryGetDefaultValue(IReadOnlyProperty, StoreObjectIdentifier, Object)

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

Returns the object that is used as the default value for the column this property is mapped to.

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

Parameters

property
IReadOnlyProperty

The property.

storeObject
StoreObjectIdentifier

The identifier of the table-like store object containing the column.

defaultValue
Object

The default value, or the CLR default if no explicit default has been set.

Returns

true if a default value has been explicitly set; false otherwise.

Applies to