CosmosPropertyExtensions.SetJsonPropertyName 方法

定義

多載

SetJsonPropertyName(IMutableProperty, String)

設定以 Cosmos 為目標時,屬性所對應的屬性名稱。

SetJsonPropertyName(IConventionProperty, String, Boolean)

設定以 Cosmos 為目標時,屬性所對應的屬性名稱。

SetJsonPropertyName(IMutableProperty, String)

設定以 Cosmos 為目標時,屬性所對應的屬性名稱。

public static void SetJsonPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property, string name);
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)

設定以 Cosmos 為目標時,屬性所對應的屬性名稱。

public static string SetJsonPropertyName (this Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string name, bool fromDataAnnotation = false);
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

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

傳回

已設定的值。

適用於