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

指示是否使用数据注释指定配置。

返回

新函数。

适用于