語言

IRelationalModel 介面

定義

代表關聯式資料庫。

public interface IRelationalModel : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable
type IRelationalModel = interface
    interface IAnnotatable
    interface IReadOnlyAnnotatable
type IRelationalModel = interface
    interface IAnnotatable
Public Interface IRelationalModel
Implements IAnnotatable
實作

備註

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

屬性

名稱 Description
Collation

回傳資料庫的彙整。

Functions

回傳模型中所有使用者定義的函式。

Item[String]

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

(繼承來源 IReadOnlyAnnotatable)
Model

拿到完整模型。

Queries

回傳模型中映射的所有 SQL 查詢。

Sequences

回傳模型中包含的所有序列。

StoredProcedures

回傳模型中所有儲存程序。

Tables

回傳模型中映射的所有資料表。

Views

回傳模型中所有映射的視圖。

方法

名稱 Description
AddRuntimeAnnotation(String, Object)

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

(繼承來源 IAnnotatable)
AnnotationsToDebugString(Int32)

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

(繼承來源 IReadOnlyAnnotatable)
FindAnnotation(String)

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

(繼承來源 IReadOnlyAnnotatable)
FindDefaultTable(String)

會拿到預設的表格,並附上名字。 若未定義包含該名稱的表格,則返回 null 。

FindFunction(String, String, IReadOnlyList<String>)

找到帶有該簽名的 a IStoreFunction 。

FindQuery(String)

會取得帶有名字的 SQL 查詢。 若未定義帶有該名稱的 SQL 查詢,則回傳 null 。

FindRuntimeAnnotation(String)

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

(繼承來源 IAnnotatable)
FindRuntimeAnnotationValue(String)

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

(繼承來源 IAnnotatable)
FindSequence(String, String)

找到帶有名字的 an ISequence 。

FindStoredProcedure(String, String)

找到 IStoreStoredProcedure 一個名字。

FindTable(String, String)

拿到有名字的表格。 若未定義包含該名稱的表格,則返回 null 。

FindView(String, String)

用名字獲得視角。 若未定義帶有該名稱的觀點,則返回 null 。

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)

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

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

擴充方法

名稱 Description
AnnotationsToDebugString(IAnnotatable, Int32)

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

GetAnnotation(IAnnotatable, String)

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

ToDebugString(IRelationalModel, MetadataDebugStringOptions, Int32)

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

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

適用於