RelationalPropertyExtensions.SetJsonPropertyName 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| SetJsonPropertyName(IMutableProperty, String) |
設定 JSON 屬性名稱的值,該屬性用於映射到 JSON 欄位的實體屬性。 |
| SetJsonPropertyName(IConventionProperty, String, Boolean) |
設定 JSON 屬性名稱的值,該屬性用於映射到 JSON 欄位的實體屬性。 |
SetJsonPropertyName(IMutableProperty, String)
設定 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)
設定 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
表示配置是否以資料註解方式指定。
傳回
設定值。