RelationalModelExtensions.AddDbFunction 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| 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.IMutableDbFunction AddDbFunction(this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, System.Reflection.MethodInfo methodInfo);
public static Microsoft.EntityFrameworkCore.Metadata.Internal.DbFunction AddDbFunction(this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, System.Reflection.MethodInfo methodInfo);
static member AddDbFunction : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * System.Reflection.MethodInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableDbFunction
static member AddDbFunction : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * System.Reflection.MethodInfo -> Microsoft.EntityFrameworkCore.Metadata.Internal.DbFunction
<Extension()>
Public Function AddDbFunction (model As IMutableModel, methodInfo As MethodInfo) As IMutableDbFunction
<Extension()>
Public Function AddDbFunction (model As IMutableModel, methodInfo As MethodInfo) As DbFunction
參數
- model
- IMutableModel
要加入這個函數的模型。
- methodInfo
- MethodInfo
MethodInfo對於映射到函數的方法。
傳回
Microsoft.EntityFrameworkCore.Metadata.Internal.DbFunction
適用於
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
表示配置是否以資料註解方式指定。
傳回
新功能。