语言

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 属性的值。 对于未映射到 JSON 的属性,默认 null 返回键属性和属性。

注解

除非显式配置,否则使用实体属性名称。

适用于