共用方式為


RelationalModelExtensions.AddDbFunction 方法

定義

多載

AddDbFunction(IMutableModel, MethodInfo)

IMutableDbFunction建立對應至指定方法的 。

AddDbFunction(IConventionModel, MethodInfo, Boolean)

建立對應至指定方法的函式。

AddDbFunction(IMutableModel, String, Type)

建立函式。

AddDbFunction(IConventionModel, String, Type, Boolean)

建立函式。

AddDbFunction(IMutableModel, MethodInfo)

IMutableDbFunction建立對應至指定方法的 。

public static Microsoft.EntityFrameworkCore.Metadata.Internal.DbFunction AddDbFunction (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, System.Reflection.MethodInfo methodInfo);
public static Microsoft.EntityFrameworkCore.Metadata.IMutableDbFunction AddDbFunction (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, System.Reflection.MethodInfo methodInfo);
static member AddDbFunction : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * System.Reflection.MethodInfo -> Microsoft.EntityFrameworkCore.Metadata.Internal.DbFunction
static member AddDbFunction : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * System.Reflection.MethodInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableDbFunction
<Extension()>
Public Function AddDbFunction (model As IMutableModel, methodInfo As MethodInfo) As DbFunction
<Extension()>
Public Function AddDbFunction (model As IMutableModel, methodInfo As MethodInfo) As IMutableDbFunction

參數

model
IMutableModel

要加入函式的模型。

methodInfo
MethodInfo

對應 MethodInfo 至函式之方法的 。

傳回

Microsoft.EntityFrameworkCore.Metadata.Internal.DbFunction

新的 IMutableDbFunction

適用於

AddDbFunction(IConventionModel, MethodInfo, Boolean)

建立對應至指定方法的函式。

public static Microsoft.EntityFrameworkCore.Metadata.IConventionDbFunction AddDbFunction (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, System.Reflection.MethodInfo methodInfo, bool fromDataAnnotation = false);
static member AddDbFunction : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * System.Reflection.MethodInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionDbFunction
<Extension()>
Public Function AddDbFunction (model As IConventionModel, methodInfo As MethodInfo, Optional fromDataAnnotation As Boolean = false) As IConventionDbFunction

參數

model
IConventionModel

要加入函式的模型。

methodInfo
MethodInfo

對應 MethodInfo 至函式之方法的 。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

傳回

新的函式。

適用於

AddDbFunction(IMutableModel, String, Type)

建立函式。

public static Microsoft.EntityFrameworkCore.Metadata.IMutableDbFunction AddDbFunction (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, string name, Type returnType);
static member AddDbFunction : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * string * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableDbFunction
<Extension()>
Public Function AddDbFunction (model As IMutableModel, name As String, returnType As Type) As IMutableDbFunction

參數

model
IMutableModel

要加入函式的模型。

name
String

函式的模型名稱。

returnType
Type

函數傳回類型。

傳回

新的函式。

適用於

AddDbFunction(IConventionModel, String, Type, Boolean)

建立函式。

public static Microsoft.EntityFrameworkCore.Metadata.IConventionDbFunction AddDbFunction (this Microsoft.EntityFrameworkCore.Metadata.IConventionModel model, string name, Type returnType, bool fromDataAnnotation = false);
static member AddDbFunction : Microsoft.EntityFrameworkCore.Metadata.IConventionModel * string * Type * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionDbFunction
<Extension()>
Public Function AddDbFunction (model As IConventionModel, name As String, returnType As Type, Optional fromDataAnnotation As Boolean = false) As IConventionDbFunction

參數

model
IConventionModel

要加入函式的模型。

name
String

函式的模型名稱。

returnType
Type

函數傳回類型。

fromDataAnnotation
Boolean

指出是否已使用資料批註指定組態。

傳回

新的函式。

適用於