CosmosPropertyExtensions.SetJsonPropertyName 方法

定义

重载

SetJsonPropertyName(IMutableProperty, String)

设置属性在面向 Cosmos 时映射到的属性名称。

SetJsonPropertyName(IConventionProperty, String, Boolean)

设置属性在面向 Cosmos 时映射到的属性名称。

SetJsonPropertyName(IMutableProperty, String)

Source:
CosmosPropertyExtensions.cs
Source:
CosmosPropertyExtensions.cs
Source:
CosmosPropertyExtensions.cs
Source:
CosmosPropertyExtensions.cs
Source:
CosmosPropertyExtensions.cs

设置属性在面向 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)

Source:
CosmosPropertyExtensions.cs
Source:
CosmosPropertyExtensions.cs
Source:
CosmosPropertyExtensions.cs
Source:
CosmosPropertyExtensions.cs
Source:
CosmosPropertyExtensions.cs

设置属性在面向 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

指示是否使用数据注释指定配置。

返回

配置的值。

适用于