CosmosPropertyBuilderExtensions.CanSetJsonProperty 方法

定義

傳回值,指出是否可以設定指定的屬性名稱。

public static bool CanSetJsonProperty (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string name, bool fromDataAnnotation = false);
public static bool CanSetJsonProperty (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string? name, bool fromDataAnnotation = false);
static member CanSetJsonProperty : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * string * bool -> bool
<Extension()>
Public Function CanSetJsonProperty (propertyBuilder As IConventionPropertyBuilder, name As String, Optional fromDataAnnotation As Boolean = false) As Boolean

參數

propertyBuilder
IConventionPropertyBuilder

要設定之屬性的產生器。

name
String

屬性的名稱。

fromDataAnnotation
Boolean

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

傳回

true 如果可以設定屬性名稱,則為 。

備註

如需詳細資訊和範例,請參閱使用 EF Core 建立實體類型和關聯性的模型化,以及 使用 EF Core 存取 Azure Cosmos DB

適用於