共用方式為


RelationalModelBuilderExtensions.HasDbFunction 方法

定義

多載

HasDbFunction(ModelBuilder, MethodInfo)

以關係資料庫為目標時設定資料庫函式。

HasDbFunction(IConventionModelBuilder, MethodInfo, Boolean)

設定關係資料庫函式。

HasDbFunction(ModelBuilder, MethodInfo, Action<DbFunctionBuilder>)

以關係資料庫為目標時設定資料庫函式。

HasDbFunction(IConventionModelBuilder, String, Type, Boolean)

設定關係資料庫函式。

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

以關係資料庫為目標時設定資料庫函式。

HasDbFunction(ModelBuilder, MethodInfo)

來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs

以關係資料庫為目標時設定資料庫函式。

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

參數

modelBuilder
ModelBuilder

模型產生器。

methodInfo
MethodInfo

這個 dbFunction 所使用的 方法Info。

傳回

進一步設定函式的產生器。

備註

如需詳細資訊和範例,請參閱 資料庫函 式。

適用於

HasDbFunction(IConventionModelBuilder, MethodInfo, Boolean)

來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs

設定關係資料庫函式。

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

參數

modelBuilder
IConventionModelBuilder

模型產生器。

methodInfo
MethodInfo

此函式所使用的方法。

fromDataAnnotation
Boolean

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

傳回

進一步設定函式的產生器。

備註

如需詳細資訊和範例,請參閱 資料庫函 式。

適用於

HasDbFunction(ModelBuilder, MethodInfo, Action<DbFunctionBuilder>)

來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs

以關係資料庫為目標時設定資料庫函式。

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

參數

modelBuilder
ModelBuilder

模型產生器。

methodInfo
MethodInfo

這個 dbFunction 所使用的 方法Info。

builderAction
Action<DbFunctionBuilder>

執行序列組態的動作。

傳回

進一步設定函式的產生器。

備註

如需詳細資訊和範例,請參閱 資料庫函 式。

適用於

HasDbFunction(IConventionModelBuilder, String, Type, Boolean)

來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs

設定關係資料庫函式。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDbFunctionBuilder HasDbFunction (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, string name, Type returnType, bool fromDataAnnotation = false);
static member HasDbFunction : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * string * Type * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionDbFunctionBuilder
<Extension()>
Public Function HasDbFunction (modelBuilder As IConventionModelBuilder, name As String, returnType As Type, Optional fromDataAnnotation As Boolean = false) As IConventionDbFunctionBuilder

參數

modelBuilder
IConventionModelBuilder

模型產生器。

name
String

函數的名稱。

returnType
Type

函式的傳回型別。

fromDataAnnotation
Boolean

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

傳回

進一步設定函式的產生器。

備註

如需詳細資訊和範例,請參閱 資料庫函 式。

適用於

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

來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs
來源:
RelationalModelBuilderExtensions.cs

以關係資料庫為目標時設定資料庫函式。

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

類型參數

TResult

參數

modelBuilder
ModelBuilder

模型產生器。

expression
Expression<Func<TResult>>

這個 dbFunction 所使用的方法。

傳回

進一步設定函式的產生器。

備註

如需詳細資訊和範例,請參閱 資料庫函 式。

適用於