語言

RelationalPropertyExtensions.GetJsonPropertyName(IReadOnlyProperty) 方法

定義

取得用於映射到 JSON 欄位的實體屬性的 JSON 屬性名稱值。

public static string? GetJsonPropertyName(this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty property);
static member GetJsonPropertyName : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty -> string
<Extension()>
Public Function GetJsonPropertyName (property As IReadOnlyProperty) As String

參數

property
IReadOnlyProperty

屬性。

傳回

用來儲存這個實體屬性的 JSON 屬性值。 預設 null 情況下,會回傳給關鍵屬性以及未映射到 JSON 的屬性。

備註

除非明確設定,否則會使用實體屬性名稱。

適用於