Share via


SqlServerPropertyAnnotations 類別

定義

透過 SqlServer(IMutableProperty) 存取之SQL Server特定批註的屬性。

public class SqlServerPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations, Microsoft.EntityFrameworkCore.Metadata.ISqlServerPropertyAnnotations
type SqlServerPropertyAnnotations = class
    inherit RelationalPropertyAnnotations
    interface ISqlServerPropertyAnnotations
    interface IRelationalPropertyAnnotations
Public Class SqlServerPropertyAnnotations
Inherits RelationalPropertyAnnotations
Implements ISqlServerPropertyAnnotations
繼承
SqlServerPropertyAnnotations
實作

建構函式

SqlServerPropertyAnnotations(IProperty)

建構指定 IProperty 之 注釋的實例。

SqlServerPropertyAnnotations(RelationalAnnotations)

建構指定批註 IProperty 協助程式所表示之 之 的實例。

欄位

ProviderFullAnnotationNames

透過 SqlServer(IMutableProperty) 存取之SQL Server特定批註的屬性。

(繼承來源 RelationalPropertyAnnotations)

屬性

Annotations

RelationalAnnotations代表 IProperty 要標注之 的協助程式。

(繼承來源 RelationalPropertyAnnotations)
ColumnName

屬性所對應之資料行的名稱。

(繼承來源 RelationalPropertyAnnotations)
ColumnType

屬性所對應之資料行的資料庫類型。

(繼承來源 RelationalPropertyAnnotations)
ComputedColumnSql

建立此屬性的資料行時,應該使用的計算條件約束 SQL 運算式。

(繼承來源 RelationalPropertyAnnotations)
DefaultValue

建立此屬性的資料行時,在資料行定義中使用的預設值。

(繼承來源 RelationalPropertyAnnotations)
DefaultValueSql

建立此屬性之資料行時應該使用的預設條件約束 SQL 運算式。

(繼承來源 RelationalPropertyAnnotations)
HiLoSequenceName

取得或設定要搭配使用的序列名稱 ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

HiLoSequenceSchema

取得或設定要搭配使用之序列的架構 ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

IsFixedLength

旗標,指出 屬性是否能夠只儲存固定長度的資料,例如字串。

(繼承來源 RelationalPropertyAnnotations)
Property

IProperty要標注的 。

(繼承來源 RelationalPropertyAnnotations)
ShouldThrowOnConflict

指出如果設定衝突的組態,是否應該擲回例外狀況。 使用 Fluent API 來實作最後一個呼叫 wins 語意時,通常會覆寫這點。

(繼承來源 RelationalPropertyAnnotations)
ShouldThrowOnInvalidConfiguration

指出如果設定不正確組態,是否應該擲回例外狀況。

(繼承來源 RelationalPropertyAnnotations)
ValueGenerationStrategy

取得或設定 SqlServerValueGenerationStrategy 要用於 屬性的 。

如果沒有針對 屬性設定策略,則會從 取得要使用的策略 IModel

方法

CanSetComputedColumnSql(String)

檢查屬性的計算 SQL 運算式是否有效。

CanSetDefaultValue(Object)

檢查是否有效設定 屬性的預設值。

CanSetDefaultValueSql(String)

檢查屬性的預設 SQL 運算式是否有效。

CanSetValueGenerationStrategy(Nullable<SqlServerValueGenerationStrategy>)

檢查是否為 屬性設定指定的 SqlServerValueGenerationStrategy 是否有效。

ClearAllServerGeneratedValues()

將 屬性的值產生重設為預設值。

FindHiLoSequence()

ISequence在模型中尋找要搭配使用的ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

GetAnnotations(IEntityType)

RelationalEntityTypeAnnotations取得的 實例, IEntityType 這個實例會維護 RelationalAnnotations 這個實例所使用的語意,以依慣例控制設定注釋。

(繼承來源 RelationalPropertyAnnotations)
GetAnnotations(IProperty)

RelationalPropertyAnnotations取得的 實例, IProperty 這個實例會維護 RelationalAnnotations 這個實例所使用的語意,以依慣例控制設定注釋。

(繼承來源 RelationalPropertyAnnotations)
GetComputedColumnSql(Boolean)

取得 屬性的計算 SQL 運算式集。

GetDefaultValue(Boolean)

取得 屬性的預設值。

GetDefaultValueSql(Boolean)

取得屬性的預設 SQL 運算式集。

GetSqlServerValueGenerationStrategy(Boolean)

取得或設定 SqlServerValueGenerationStrategy 要用於 屬性的 。

SetColumnName(String)

嘗試使用 中的 語意 RelationalAnnotations 來設定 ColumnName

(繼承來源 RelationalPropertyAnnotations)
SetColumnType(String)

嘗試使用 中的 語意 RelationalAnnotations 來設定 ColumnType

(繼承來源 RelationalPropertyAnnotations)
SetComputedColumnSql(String)

嘗試使用 中的 語意 RelationalAnnotations 來設定 ComputedColumnSql

(繼承來源 RelationalPropertyAnnotations)
SetDefaultValue(Object)

嘗試使用 中的 語意 RelationalAnnotations 來設定 DefaultValue

(繼承來源 RelationalPropertyAnnotations)
SetDefaultValueSql(String)

嘗試使用 中的 語意 RelationalAnnotations 來設定 DefaultValueSql

(繼承來源 RelationalPropertyAnnotations)
SetFixedLength(Boolean)

將 屬性設定為只能儲存固定長度的資料,例如字串。

(繼承來源 RelationalPropertyAnnotations)
SetHiLoSequenceName(String)

設定要搭配 ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String) 使用的序列名稱。

SetHiLoSequenceSchema(String)

設定要搭配 ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String) 使用的序列架構。

SetValueGenerationStrategy(Nullable<SqlServerValueGenerationStrategy>)

SqlServerValueGenerationStrategy設定 要用於 屬性的 。

適用於