Share via


RelationalModelExtensions.AddDbFunction Method

Definition

Overloads

AddDbFunction(IMutableModel, MethodInfo)

Creates an IMutableDbFunction mapped to the given method.

AddDbFunction(IConventionModel, MethodInfo, Boolean)

Creates a function mapped to the given method.

AddDbFunction(IMutableModel, String, Type)

Creates a function.

AddDbFunction(IConventionModel, String, Type, Boolean)

Creates a function.

AddDbFunction(IMutableModel, MethodInfo)

Creates an IMutableDbFunction mapped to the given method.

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

Parameters

model
IMutableModel

The model to add the function to.

methodInfo
MethodInfo

The MethodInfo for the method that is mapped to the function.

Returns

Microsoft.EntityFrameworkCore.Metadata.Internal.DbFunction

The new IMutableDbFunction.

Applies to

AddDbFunction(IConventionModel, MethodInfo, Boolean)

Creates a function mapped to the given method.

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

Parameters

model
IConventionModel

The model to add the function to.

methodInfo
MethodInfo

The MethodInfo for the method that is mapped to the function.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The new function.

Applies to

AddDbFunction(IMutableModel, String, Type)

Creates a function.

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

Parameters

model
IMutableModel

The model to add the function to.

name
String

The model name of the function.

returnType
Type

The function return type.

Returns

The new function.

Applies to

AddDbFunction(IConventionModel, String, Type, Boolean)

Creates a function.

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

Parameters

model
IConventionModel

The model to add the function to.

name
String

The model name of the function.

returnType
Type

The function return type.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The new function.

Applies to