RelationalModelBuilderExtensions.HasDbFunction Method

Definition

Overloads

HasDbFunction(ModelBuilder, MethodInfo)

Configures a database function when targeting a relational database.

HasDbFunction(IConventionModelBuilder, MethodInfo, Boolean)

Configures a database function when targeting a relational database.

HasDbFunction(ModelBuilder, MethodInfo, Action<DbFunctionBuilder>)

Configures a database function when targeting a relational database.

HasDbFunction<TResult>(ModelBuilder, Expression<Func<TResult>>)

Configures a database function when targeting a relational database.

HasDbFunction(ModelBuilder, MethodInfo)

Configures a database function when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder HasDbFunction (this Microsoft.EntityFrameworkCore.ModelBuilder modelBuilder, System.Reflection.MethodInfo methodInfo);
static member HasDbFunction : Microsoft.EntityFrameworkCore.ModelBuilder * System.Reflection.MethodInfo -> Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder
<Extension()>
Public Function HasDbFunction (modelBuilder As ModelBuilder, methodInfo As MethodInfo) As DbFunctionBuilder

Parameters

modelBuilder
ModelBuilder

The model builder.

methodInfo
MethodInfo

The methodInfo this dbFunction uses.

Returns

DbFunctionBuilder

A builder to further configure the function.

HasDbFunction(IConventionModelBuilder, MethodInfo, Boolean)

Configures a database function when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDbFunctionBuilder HasDbFunction (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, System.Reflection.MethodInfo methodInfo, bool fromDataAnnotation = false);
static member HasDbFunction : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * System.Reflection.MethodInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDbFunctionBuilder
<Extension()>
Public Function HasDbFunction (modelBuilder As IConventionModelBuilder, methodInfo As MethodInfo, Optional fromDataAnnotation As Boolean = false) As IConventionDbFunctionBuilder

Parameters

modelBuilder
IConventionModelBuilder

The model builder.

methodInfo
MethodInfo

The methodInfo this dbFunction uses.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

IConventionDbFunctionBuilder

A builder to further configure the function.

HasDbFunction(ModelBuilder, MethodInfo, Action<DbFunctionBuilder>)

Configures a database function when targeting a relational database.

public static Microsoft.EntityFrameworkCore.ModelBuilder HasDbFunction (this Microsoft.EntityFrameworkCore.ModelBuilder modelBuilder, System.Reflection.MethodInfo methodInfo, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder> builderAction);
static member HasDbFunction : Microsoft.EntityFrameworkCore.ModelBuilder * System.Reflection.MethodInfo * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder> -> Microsoft.EntityFrameworkCore.ModelBuilder
<Extension()>
Public Function HasDbFunction (modelBuilder As ModelBuilder, methodInfo As MethodInfo, builderAction As Action(Of DbFunctionBuilder)) As ModelBuilder

Parameters

modelBuilder
ModelBuilder

The model builder.

methodInfo
MethodInfo

The methodInfo this dbFunction uses.

builderAction
Action<DbFunctionBuilder>

An action that performs configuration of the sequence.

Returns

ModelBuilder

A builder to further configure the function.

HasDbFunction<TResult>(ModelBuilder, Expression<Func<TResult>>)

Configures a database function when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder HasDbFunction<TResult> (this Microsoft.EntityFrameworkCore.ModelBuilder modelBuilder, System.Linq.Expressions.Expression<Func<TResult>> expression);
static member HasDbFunction : Microsoft.EntityFrameworkCore.ModelBuilder * System.Linq.Expressions.Expression<Func<'Result>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.DbFunctionBuilder
<Extension()>
Public Function HasDbFunction(Of TResult) (modelBuilder As ModelBuilder, expression As Expression(Of Func(Of TResult))) As DbFunctionBuilder

Type Parameters

TResult

Parameters

modelBuilder
ModelBuilder

The model builder.

expression
Expression<Func<TResult>>

The method this dbFunction uses.

Returns

DbFunctionBuilder

A builder to further configure the function.

Applies to