語言

RuntimeDbFunction 類別

定義

代表模型中的關聯式資料庫函式。

[System.Runtime.CompilerServices.Nullable(0)]
public class RuntimeDbFunction : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeDbFunction
public class RuntimeDbFunction : Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableBase, Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeDbFunction
[<System.Runtime.CompilerServices.Nullable(0)>]
type RuntimeDbFunction = class
    inherit AnnotatableBase
    interface IRuntimeDbFunction
    interface IDbFunction
    interface IReadOnlyDbFunction
    interface IReadOnlyAnnotatable
    interface IAnnotatable
type RuntimeDbFunction = class
    inherit AnnotatableBase
    interface IRuntimeDbFunction
    interface IDbFunction
    interface IReadOnlyDbFunction
    interface IReadOnlyAnnotatable
    interface IAnnotatable
Public Class RuntimeDbFunction
Inherits AnnotatableBase
Implements IRuntimeDbFunction
繼承
RuntimeDbFunction
屬性
實作
IAnnotatable IReadOnlyAnnotatable IDbFunction Microsoft.EntityFrameworkCore.Metadata.Internal.IRuntimeDbFunction IReadOnlyDbFunction

備註

更多資訊與範例請參見 資料庫函數 。

建構函式

名稱 Description
RuntimeDbFunction(String, RuntimeModel, Type, String, String, String, MethodInfo, Boolean, Boolean, Boolean, Boolean, RelationalTypeMapping, Func<IReadOnlyList<SqlExpression>,SqlExpression>)

初始化 RuntimeDbFunction 類別的新執行個體。

屬性

名稱 Description
DebugView

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

IsReadOnly

表示目前物件是否為唯讀。

(繼承來源 AnnotatableBase)
Item[String]

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

(繼承來源 AnnotatableBase)
Model

得到定義此函數的模型。

ModelName

取得模型中函數的名稱。

StoreFunction

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

TypeMapping

取得或設定函式回傳型別的型別映射。

方法

名稱 Description
AddAnnotation(String, Annotation)

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

(繼承來源 AnnotatableBase)
AddAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
AddAnnotations(IEnumerable<IAnnotation>)

為此物件新增註解。

(繼承來源 AnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增註解。

(繼承來源 AnnotatableBase)
AddParameter(String, Type, Boolean, String, RelationalTypeMapping)

為函數加入參數。

AddRuntimeAnnotation(String, Annotation)

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

(繼承來源 AnnotatableBase)
AddRuntimeAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

為此物件新增執行時註解。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

為此物件新增執行時註解。

(繼承來源 AnnotatableBase)
CreateAnnotation(String, Object)

建立新的註解。

(繼承來源 AnnotatableBase)
CreateRuntimeAnnotation(String, Object)

建立新的執行時註解。

(繼承來源 AnnotatableBase)
EnsureMutable()

如果模型是唯讀,則會拋出。

(繼承來源 AnnotatableBase)
EnsureReadOnly()

若模型非唯讀,則會擲出。

(繼承來源 AnnotatableBase)
FindAnnotation(String)

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

(繼承來源 AnnotatableBase)
FindRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
GetAnnotation(String)

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

(繼承來源 AnnotatableBase)
GetAnnotations()

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

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

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

(繼承來源 AnnotatableBase)
GetRuntimeAnnotations()

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

(繼承來源 AnnotatableBase)
OnAnnotationSet(String, Annotation, Annotation)

當註解被設定或移除時會被呼叫。

(繼承來源 AnnotatableBase)
RemoveAnnotation(String)

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

(繼承來源 AnnotatableBase)
RemoveRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
SetAnnotation(String, Annotation, Annotation)

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

(繼承來源 AnnotatableBase)
SetAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
SetRuntimeAnnotation(String, Annotation, Annotation)

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

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

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

(繼承來源 AnnotatableBase)
ToString()

傳回表示目前 物件的字串。

明確介面實作

名稱 Description
IAnnotatable.AddRuntimeAnnotation(String, Object)

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

(繼承來源 AnnotatableBase)
IAnnotatable.FindRuntimeAnnotation(String)

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

(繼承來源 AnnotatableBase)
IAnnotatable.GetRuntimeAnnotations()

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

(繼承來源 AnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

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

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

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

(繼承來源 AnnotatableBase)
IDbFunction.Model

得到定義此函數的模型。

IDbFunction.Parameters

取得此函數的參數

IDbFunction.StoreFunction

得到相關的 IStoreFunction。

IReadOnlyAnnotatable.FindAnnotation(String)

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

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

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

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.Item[String]

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

(繼承來源 AnnotatableBase)
IReadOnlyDbFunction.IsAggregate

取得表示該函數是否為聚合函數的值。

IReadOnlyDbFunction.IsBuiltIn

取得顯示資料庫函式是否內建的值。

IReadOnlyDbFunction.IsNullable

取得顯示資料庫函式是否能回傳 null 的值。

IReadOnlyDbFunction.IsScalar

得到表示此函數是否回傳純量值的值。

IReadOnlyDbFunction.MethodInfo

取得 CLR 方法,該方法會映射到資料庫中的函式。

IReadOnlyDbFunction.Model

得到定義此函數的模型。

IReadOnlyDbFunction.Name

取得資料庫中函式的名稱。

IReadOnlyDbFunction.Parameters

取得此函數的參數。

IReadOnlyDbFunction.ReturnType

拿回的CLR類型。

IReadOnlyDbFunction.Schema

取得資料庫中函式的結構。

IReadOnlyDbFunction.StoreType

取得已設定的 store 類型字串。

IReadOnlyDbFunction.Translation

取得將方法呼叫自訂轉譯成 SQL 表達式片段時的轉換回調。

IReadOnlyDbFunction.TypeMapping

取得函式回傳型別的型別映射。

IRuntimeDbFunction.StoreFunction

代表模型中的關聯式資料庫函式。

擴充方法

名稱 Description
AnnotationsToDebugString(IAnnotatable, Int32)

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

適用於