語言

RelationalPropertyBuilderExtensions.HasJsonPropertyName 方法

定義

多載

名稱 Description
HasJsonPropertyName(PropertyBuilder, String)

設定映射到 JSON 欄位的實體屬性,將實體屬性映射到特定的 JSON 屬性,而非使用實體屬性名稱。

HasJsonPropertyName(IConventionPropertyBuilder, String, Boolean)

設定映射到 JSON 欄位的實體屬性,將實體屬性映射到特定的 JSON 屬性,而非使用實體屬性名稱。

HasJsonPropertyName<TProperty>(PropertyBuilder<TProperty>, String)

設定映射到 JSON 欄位的實體屬性,將實體屬性映射到特定的 JSON 屬性,而非使用實體屬性名稱。

HasJsonPropertyName(PropertyBuilder, String)

來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs

設定映射到 JSON 欄位的實體屬性,將實體屬性映射到特定的 JSON 屬性,而非使用實體屬性名稱。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasJsonPropertyName(this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, string? name);
static member HasJsonPropertyName : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function HasJsonPropertyName (propertyBuilder As PropertyBuilder, name As String) As PropertyBuilder

參數

propertyBuilder
PropertyBuilder

正在配置的物業的建商。

name
String

使用 JSON 屬性名稱。

傳回

同一個建構實例,這樣可以串接多個呼叫。

適用於

HasJsonPropertyName(IConventionPropertyBuilder, String, Boolean)

來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs

設定映射到 JSON 欄位的實體屬性,將實體屬性映射到特定的 JSON 屬性,而非使用實體屬性名稱。

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

參數

propertyBuilder
IConventionPropertyBuilder

正在配置的物業的建商。

name
String

使用 JSON 屬性名稱。

fromDataAnnotation
Boolean

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

傳回

如果設定是套用,則使用同一個建構者實例, null 否則。

適用於

HasJsonPropertyName<TProperty>(PropertyBuilder<TProperty>, String)

來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs

設定映射到 JSON 欄位的實體屬性,將實體屬性映射到特定的 JSON 屬性,而非使用實體屬性名稱。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> HasJsonPropertyName<TProperty>(this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, string? name);
static member HasJsonPropertyName : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
<Extension()>
Public Function HasJsonPropertyName(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty), name As String) As PropertyBuilder(Of TProperty)

類型參數

TProperty

參數

propertyBuilder
PropertyBuilder<TProperty>

正在配置的物業的建商。

name
String

使用 JSON 屬性名稱。

傳回

同一個建構實例,這樣可以串接多個呼叫。

適用於