語言

IColumn 介面

定義

代表表格中的一欄。

public interface IColumn : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IColumnBase
type IColumn = interface
    interface IColumnBase
    interface IAnnotatable
    interface IReadOnlyAnnotatable
type IColumn = interface
    interface IColumnBase
    interface IAnnotatable
Public Interface IColumn
Implements IAnnotatable, IColumnBase
實作

備註

更多資訊與範例請參閱 建模實體類型與關係 。

屬性

名稱 Description
Collation

本欄的彙整

Comment

在本專欄留言

ComputedColumnSql

回傳用作此欄計算值的 SQL 表達式。

DefaultValue

回傳作為該欄位預設值的物件。

DefaultValueSql

回傳此欄位預設值的 SQL 運算式。

IsFixedLength

回傳一個標誌,指示該屬性是否能僅儲存固定長度的資料,例如字串。

IsNullable

取得欄位是否能包含 NULL 的值。

(繼承來源 IColumnBase)
IsRowVersion

指示此欄位是否自動作為並行標記,每次更新產生不同值,類似 SQL Server 的「rowversion」/「timestamp」欄位。

IsStored

回傳該屬性映射到的計算欄位值是儲存在資料庫中,還是讀取時計算。

IsUnicode

會取得一個值,表示該屬性是否能持久化 Unicode 字元。

Item[String]

取得帶有名稱的註解值,若不存在則回 null 傳。

(繼承來源 IReadOnlyAnnotatable)
JsonElement

取得此欄位的根 JSON 元素,或 null 若欄位不是 JSON 欄位則取得。

(繼承來源 IColumnBase)
MaxLength

取得本欄允許的最大資料長度。 例如,若屬性為 String ',則為最大字元數。

Name

取得欄位名稱。

(繼承來源 IColumnBase)
Order

取得欄位順序。

Precision

取得此欄位允許的資料精度。 例如,若屬性為 Decimal ',則為最大數字數。

PropertyMappings

取得房產映射。

ProviderClrType

取得提供者類型。

(繼承來源 IColumnBase)
ProviderValueComparer

這篇專欄就拿到答案 ValueComparer 了。

(繼承來源 IColumnBase)
Scale

取得本欄允許的資料規模。 例如,若性質為 Decimal ',則為小數點數的最大數。

StoreType

取得欄位類型。

(繼承來源 IColumnBase)
StoreTypeMapping

取得欄位狀物件的型別映射。

(繼承來源 IColumnBase)
Table

拿到包含表。

方法

名稱 Description
AddRuntimeAnnotation(String, Object)

為此物件新增執行時註解。 如果已有指定名稱的註解存在,則會拋出。

(繼承來源 IAnnotatable)
AnnotationsToDebugString(Int32)

取得物件上所有宣告註解的除錯字串。

(繼承來源 IReadOnlyAnnotatable)
FindAnnotation(String)

取得帶有名字的註解,若不存在則回 null 傳。

(繼承來源 IReadOnlyAnnotatable)
FindColumnMapping(IReadOnlyEntityType)

回傳該實體類型的屬性映射。

FindRuntimeAnnotation(String)

取得帶有名稱的執行時註解,若不存在則回 null 傳。

(繼承來源 IAnnotatable)
FindRuntimeAnnotationValue(String)

取得執行時註解的值,若名稱不存在則回 null 傳。

(繼承來源 IAnnotatable)
GetAnnotation(String)

取得帶有名稱的註解,若不存在則拋出。

(繼承來源 IReadOnlyAnnotatable)
GetAnnotations()

取得目前物件的所有註解。

(繼承來源 IReadOnlyAnnotatable)
GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

取得帶有名稱的執行時註解值,若不存在則加入該註解。

(繼承來源 IAnnotatable)
GetRuntimeAnnotations()

取得目前物件上的所有執行時註解。

(繼承來源 IAnnotatable)
RemoveRuntimeAnnotation(String)

移除該物件中給定的執行時註解。

(繼承來源 IAnnotatable)
SetRuntimeAnnotation(String, Object)

設定在指定鍵值下儲存的執行時註解。 若已有指定名稱的註解存在,則會覆寫現有註解。

(繼承來源 IAnnotatable)
ToDebugString(MetadataDebugStringOptions, Int32)

建立給定元資料的可讀表示法。

警告:請勿依賴回傳字串的格式。 它僅設計用於除錯,且可能在不同版本間任意變動。

TryGetDefaultValue(Object)

取得此欄位預設值的物件。

明確介面實作

名稱 Description
IColumnBase.ToDebugString(MetadataDebugStringOptions, Int32)

建立給定元資料的可讀表示法。

警告:請勿依賴回傳字串的格式。 它僅設計用於除錯,且可能在不同版本間任意變動。

擴充方法

名稱 Description
AnnotationsToDebugString(IAnnotatable, Int32)

取得物件上所有宣告註解的除錯字串。

GetAnnotation(IAnnotatable, String)

取得帶有名稱的註解,若不存在則拋出。

ToDebugString(IColumn, MetadataDebugStringOptions, Int32)

建立給定元資料的可讀表示法。

警告:請勿依賴回傳字串的格式。 它僅設計用於除錯,且可能在不同版本間任意變動。

適用於