語言

RelationalPropertyExtensions.SetJsonPropertyName 方法

定義

多載

名稱 Description
SetJsonPropertyName(IMutableProperty, String)

設定 JSON 屬性名稱的值,該屬性用於映射到 JSON 欄位的實體屬性。

SetJsonPropertyName(IConventionProperty, String, Boolean)

設定 JSON 屬性名稱的值,該屬性用於映射到 JSON 欄位的實體屬性。

SetJsonPropertyName(IMutableProperty, String)

來源:
RelationalPropertyExtensions.cs
來源:
RelationalPropertyExtensions.cs
來源:
RelationalPropertyExtensions.cs
來源:
RelationalPropertyExtensions.cs
來源:
RelationalPropertyExtensions.cs

設定 JSON 屬性名稱的值,該屬性用於映射到 JSON 欄位的實體屬性。

public static void SetJsonPropertyName(this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, string? name);
static member SetJsonPropertyName : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty * string -> unit
<Extension()>
Public Sub SetJsonPropertyName (property As IMutableProperty, name As String)

參數

property
IMutableProperty

屬性。

name
String

該用的名字。

適用於

SetJsonPropertyName(IConventionProperty, String, Boolean)

來源:
RelationalPropertyExtensions.cs
來源:
RelationalPropertyExtensions.cs
來源:
RelationalPropertyExtensions.cs
來源:
RelationalPropertyExtensions.cs
來源:
RelationalPropertyExtensions.cs

設定 JSON 屬性名稱的值,該屬性用於映射到 JSON 欄位的實體屬性。

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

參數

property
IConventionProperty

屬性。

name
String

該用的名字。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

設定值。

適用於