Share via


CosmosPropertyBuilderExtensions.CanSetJsonProperty Method

Definition

Returns a value indicating whether the given property name can be set.

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

Parameters

propertyBuilder
IConventionPropertyBuilder

The builder for the property being configured.

name
String

The name of the property.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the property name can be set.

Remarks

See Modeling entity types and relationships, and Accessing Azure Cosmos DB with EF Core for more information and examples.

Applies to