RelationalEntityTypeBuilderExtensions.CanSetFunction 方法

定義

多載

CanSetFunction(IConventionEntityTypeBuilder, MethodInfo, Boolean)

傳回值,指出是否可以使用指定的組態來源為這個實體類型設定函式名稱。

CanSetFunction(IConventionEntityTypeBuilder, String, Boolean)

傳回值,指出是否可以使用指定的組態來源為這個實體類型設定函式名稱。

CanSetFunction(IConventionEntityTypeBuilder, MethodInfo, Boolean)

傳回值,指出是否可以使用指定的組態來源為這個實體類型設定函式名稱。

public static bool CanSetFunction (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, System.Reflection.MethodInfo? function, bool fromDataAnnotation = false);
static member CanSetFunction : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder * System.Reflection.MethodInfo * bool -> bool
<Extension()>
Public Function CanSetFunction (entityTypeBuilder As IConventionEntityTypeBuilder, function As MethodInfo, Optional fromDataAnnotation As Boolean = false) As Boolean

參數

entityTypeBuilder
IConventionEntityTypeBuilder

要設定之實體類型的產生器。

function
MethodInfo

表示函式的方法。

fromDataAnnotation
Boolean

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

傳回

true 如果可以套用組態,則為 。

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。

適用於

CanSetFunction(IConventionEntityTypeBuilder, String, Boolean)

傳回值,指出是否可以使用指定的組態來源為這個實體類型設定函式名稱。

public static bool CanSetFunction (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, string name, bool fromDataAnnotation = false);
public static bool CanSetFunction (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, string? name, bool fromDataAnnotation = false);
static member CanSetFunction : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder * string * bool -> bool
<Extension()>
Public Function CanSetFunction (entityTypeBuilder As IConventionEntityTypeBuilder, name As String, Optional fromDataAnnotation As Boolean = false) As Boolean

參數

entityTypeBuilder
IConventionEntityTypeBuilder

要設定之實體類型的產生器。

name
String

函數的名稱。

fromDataAnnotation
Boolean

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

傳回

true 如果可以套用組態,則為 。

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。

適用於