Condividi tramite


ComplexPropertyBuilder Class

Definition

Provides a simple API for configuring an IMutableComplexProperty.

public class ComplexPropertyBuilder : Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionComplexPropertyBuilder>, Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionComplexTypeBuilder>
type ComplexPropertyBuilder = class
    interface IInfrastructure<IConventionComplexPropertyBuilder>
    interface IInfrastructure<IConventionComplexTypeBuilder>
Public Class ComplexPropertyBuilder
Implements IInfrastructure(Of IConventionComplexPropertyBuilder), IInfrastructure(Of IConventionComplexTypeBuilder)
Inheritance
ComplexPropertyBuilder
Derived
Implements

Remarks

Instances of this class are returned from methods when using the ModelBuilder API and it is not designed to be directly constructed in your application code.

Constructors

ComplexPropertyBuilder(IMutableComplexProperty)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Properties

Metadata

The complex property being configured.

PropertyBuilder

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

TypeBuilder

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Methods

ComplexProperty(String, Action<ComplexPropertyBuilder>)

Configures a complex property of the complex type. If no property with the given name exists, then a new property will be added.

ComplexProperty(String)

Returns an object that can be used to configure a complex property of the complex type. If no property with the given name exists, then a new property will be added.

ComplexProperty(Type, String, Action<ComplexPropertyBuilder>)

Configures a complex property of the complex type. If no property with the given name exists, then a new property will be added.

ComplexProperty(Type, String, String, Action<ComplexPropertyBuilder>)

Configures a complex property of the complex type. If no property with the given name exists, then a new property will be added.

ComplexProperty(Type, String, String)

Returns an object that can be used to configure a complex property of the complex type. If no property with the given name exists, then a new property will be added.

ComplexProperty(Type, String)

Returns an object that can be used to configure a complex property of the complex type. If no property with the given name exists, then a new property will be added.

ComplexProperty<TProperty>(String, Action<ComplexPropertyBuilder<TProperty>>)

Configures a complex property of the complex type. If no property with the given name exists, then a new property will be added.

ComplexProperty<TProperty>(String, String, Action<ComplexPropertyBuilder<TProperty>>)

Configures a complex property of the complex type. If no property with the given name exists, then a new property will be added.

ComplexProperty<TProperty>(String, String)

Returns an object that can be used to configure a complex property of the complex type. If no property with the given name exists, then a new property will be added.

ComplexProperty<TProperty>(String)

Returns an object that can be used to configure a complex property of the complex type. If no property with the given name exists, then a new property will be added.

HasChangeTrackingStrategy(ChangeTrackingStrategy)

Configures the ChangeTrackingStrategy to be used for this entity type. This strategy indicates how the context detects changes to properties for an instance of the entity type.

HasField(String)

Sets the backing field to use for this property.

HasPropertyAnnotation(String, Object)

Adds or updates an annotation on the complex property. If an annotation with the key specified in annotation already exists its value will be updated.

HasTypeAnnotation(String, Object)

Adds or updates an annotation on the complex type. If an annotation with the key specified in annotation already exists its value will be updated.

Ignore(String)

Excludes the given property from the complex type. This method is typically used to remove properties and navigations from the complex type that were added by convention.

IndexerProperty(Type, String)

Returns an object that can be used to configure a property of the complex type. If no property with the given name exists, then a new property will be added.

IndexerProperty<TProperty>(String)

Returns an object that can be used to configure a property of the complex type. If no property with the given name exists, then a new property will be added.

IsRequired(Boolean)

Configures whether this property must have a value assigned or null is a valid value. A property can only be configured as non-required if it is based on a CLR type that can be assigned null.

PrimitiveCollection(String)

Returns an object that can be used to configure a property of the complex type. If no property with the given name exists, then a new property will be added.

PrimitiveCollection(Type, String)

Returns an object that can be used to configure a property of the complex type. If no property with the given name exists, then a new property will be added.

PrimitiveCollection<TProperty>(String)

Returns an object that can be used to configure a property of the complex type. If no property with the given name exists, then a new property will be added.

Property(String)

Returns an object that can be used to configure a property of the complex type. If no property with the given name exists, then a new property will be added.

Property(Type, String)

Returns an object that can be used to configure a property of the complex type. If no property with the given name exists, then a new property will be added.

Property<TProperty>(String)

Returns an object that can be used to configure a property of the complex type. If no property with the given name exists, then a new property will be added.

UseDefaultPropertyAccessMode(PropertyAccessMode)

Sets the PropertyAccessMode to use for all properties of this complex type.

UsePropertyAccessMode(PropertyAccessMode)

Sets the PropertyAccessMode to use for this property.

Explicit Interface Implementations

IInfrastructure<IConventionComplexPropertyBuilder>.Instance

Gets the internal builder being used to configure the complex property.

IInfrastructure<IConventionComplexTypeBuilder>.Instance

Gets the internal builder being used to configure the complex type.

Extension Methods

GetInfrastructure<T>(IInfrastructure<T>)

Gets the value from a property that is being hidden using IInfrastructure<T>.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

Applies to