Table of Contents

Interface IConventionComplexProperty

Namespace
Microsoft.EntityFrameworkCore.Metadata
Assembly
Microsoft.EntityFrameworkCore.dll

Represents a complex property of a structural type.

public interface IConventionComplexProperty : IReadOnlyComplexProperty, IConventionPropertyBase, IReadOnlyPropertyBase, IConventionAnnotatable, IReadOnlyAnnotatable
Inherited Members
Extension Methods

Remarks

This interface is used during model creation and allows the metadata to be modified. Once the model is built, IComplexProperty represents a read-only view of the same metadata.

See Model building conventions for more information and examples.

Properties

Builder

Gets the builder that can be used to configure this property.

IConventionComplexPropertyBuilder Builder { get; }

Property Value

IConventionComplexPropertyBuilder

Exceptions

InvalidOperationException

If the property has been removed from the model.

ComplexType

Gets the associated complex type.

IConventionComplexType ComplexType { get; }

Property Value

IConventionComplexType

Methods

GetIsNullableConfigurationSource()

Returns the configuration source for IsNullable.

ConfigurationSource? GetIsNullableConfigurationSource()

Returns

ConfigurationSource?

The configuration source for IsNullable.

SetIsNullable(bool?, bool)

Sets a value indicating whether this property can contain null.

bool? SetIsNullable(bool? nullable, bool fromDataAnnotation = false)

Parameters

nullable bool?

A value indicating whether this property can contain null. null to reset to default.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

bool?

The configured value.