RelationalPropertyExtensions.GetDefaultValueSql Method

Definition

Overloads

GetDefaultValueSql(IProperty)

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

GetDefaultValueSql(IReadOnlyProperty)

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

GetDefaultValueSql(IProperty, StoreObjectIdentifier)

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

GetDefaultValueSql(IReadOnlyProperty, StoreObjectIdentifier)

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

GetDefaultValueSql(IProperty)

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

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

C#
public static string GetDefaultValueSql (this Microsoft.EntityFrameworkCore.Metadata.IProperty property);

Parameters

property
IProperty

The property.

Returns

The SQL expression that is used as the default value for the column this property is mapped to.

Applies to

Entity Framework Core 5.0 och andra versioner
Produkt Versioner
Entity Framework Core 3.0, 3.1, 5.0

GetDefaultValueSql(IReadOnlyProperty)

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

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

C#
public static string? GetDefaultValueSql (this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property);

Parameters

property
IReadOnlyProperty

The property.

Returns

The SQL expression that is used as the default value for the column this property is mapped to.

Applies to

Entity Framework Core 9.0 och andra versioner
Produkt Versioner
Entity Framework Core 6.0, 7.0, 8.0, 9.0

GetDefaultValueSql(IProperty, StoreObjectIdentifier)

Source:
RelationalPropertyExtensions.cs

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

C#
public static string GetDefaultValueSql (this Microsoft.EntityFrameworkCore.Metadata.IProperty property, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject);

Parameters

property
IProperty

The property.

storeObject
StoreObjectIdentifier

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

Returns

The SQL expression that is used as the default value for the column this property is mapped to.

Applies to

Entity Framework Core 5.0
Produkt Versioner
Entity Framework Core 5.0

GetDefaultValueSql(IReadOnlyProperty, StoreObjectIdentifier)

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

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

C#
public static string? GetDefaultValueSql (this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject);

Parameters

property
IReadOnlyProperty

The property.

storeObject
StoreObjectIdentifier

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

Returns

The SQL expression that is used as the default value for the column this property is mapped to.

Applies to

Entity Framework Core 9.0 och andra versioner
Produkt Versioner
Entity Framework Core 6.0, 7.0, 8.0, 9.0