Partilhar via


ComplexPropertyBuilder.ComplexProperty Method

Definition

Overloads

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(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)

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)

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, 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<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, 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)

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(String)

Source:
ComplexPropertyBuilder.cs
Source:
ComplexPropertyBuilder.cs

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.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty (string propertyName);
abstract member ComplexProperty : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyName As String) As ComplexPropertyBuilder

Parameters

propertyName
String

The name of the property to be configured.

Returns

An object that can be used to configure the property.

Remarks

When adding a new property with this overload the property name must match the name of a CLR property or field on the complex type. This overload cannot be used to add a new shadow state complex property.

Applies to

ComplexProperty(String, Action<ComplexPropertyBuilder>)

Source:
ComplexPropertyBuilder.cs
Source:
ComplexPropertyBuilder.cs

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

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty (string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> buildAction);
abstract member ComplexProperty : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyName As String, buildAction As Action(Of ComplexPropertyBuilder)) As ComplexPropertyBuilder

Parameters

propertyName
String

The name of the property to be configured.

buildAction
Action<ComplexPropertyBuilder>

An action that performs configuration of the property.

Returns

The same builder instance so that multiple configuration calls can be chained.

Remarks

When adding a new property with this overload the property name must match the name of a CLR property or field on the complex type. This overload cannot be used to add a new shadow state complex property.

Applies to

ComplexProperty(Type, String)

Source:
ComplexPropertyBuilder.cs
Source:
ComplexPropertyBuilder.cs

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.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty (Type propertyType, string propertyName);
abstract member ComplexProperty : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyType As Type, propertyName As String) As ComplexPropertyBuilder

Parameters

propertyType
Type

The type of the property to be configured.

propertyName
String

The name of the property to be configured.

Returns

An object that can be used to configure the property.

Remarks

When adding a new complex property, if a property with the same name exists in the complex class then it will be added to the model. If no property exists in the complex class, then a new shadow state complex property will be added. A shadow state property is one that does not have a corresponding property in the complex class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the complex class.

Applies to

ComplexProperty(Type, String, Action<ComplexPropertyBuilder>)

Source:
ComplexPropertyBuilder.cs
Source:
ComplexPropertyBuilder.cs

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

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty (Type propertyType, string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> buildAction);
abstract member ComplexProperty : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyType As Type, propertyName As String, buildAction As Action(Of ComplexPropertyBuilder)) As ComplexPropertyBuilder

Parameters

propertyType
Type

The type of the property to be configured.

propertyName
String

The name of the property to be configured.

buildAction
Action<ComplexPropertyBuilder>

An action that performs configuration of the property.

Returns

The same builder instance so that multiple configuration calls can be chained.

Remarks

When adding a new complex property, if a property with the same name exists in the complex class then it will be added to the model. If no property exists in the complex class, then a new shadow state complex property will be added. A shadow state property is one that does not have a corresponding property in the complex class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the complex class.

Applies to

ComplexProperty(Type, String, String)

Source:
ComplexPropertyBuilder.cs
Source:
ComplexPropertyBuilder.cs

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.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty (Type propertyType, string propertyName, string complexTypeName);
abstract member ComplexProperty : Type * string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : Type * string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyType As Type, propertyName As String, complexTypeName As String) As ComplexPropertyBuilder

Parameters

propertyType
Type

The type of the property to be configured.

propertyName
String

The name of the property to be configured.

complexTypeName
String

The name of the complex type.

Returns

An object that can be used to configure the property.

Remarks

When adding a new complex property, if a property with the same name exists in the complex class then it will be added to the model. If no property exists in the complex class, then a new shadow state complex property will be added. A shadow state property is one that does not have a corresponding property in the complex class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the complex class.

Applies to

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

Source:
ComplexPropertyBuilder.cs
Source:
ComplexPropertyBuilder.cs

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

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty (Type propertyType, string propertyName, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> buildAction);
abstract member ComplexProperty : Type * string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : Type * string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty (propertyType As Type, propertyName As String, complexTypeName As String, buildAction As Action(Of ComplexPropertyBuilder)) As ComplexPropertyBuilder

Parameters

propertyType
Type

The type of the property to be configured.

propertyName
String

The name of the property to be configured.

complexTypeName
String

The name of the complex type.

buildAction
Action<ComplexPropertyBuilder>

An action that performs configuration of the property.

Returns

The same builder instance so that multiple configuration calls can be chained.

Remarks

When adding a new complex property, if a property with the same name exists in the complex class then it will be added to the model. If no property exists in the complex class, then a new shadow state complex property will be added. A shadow state property is one that does not have a corresponding property in the complex class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the complex class.

Applies to

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

Source:
ComplexPropertyBuilder.cs
Source:
ComplexPropertyBuilder.cs

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

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty<TProperty> (string propertyName, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction);
abstract member ComplexProperty : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty(Of TProperty) (propertyName As String, complexTypeName As String, buildAction As Action(Of ComplexPropertyBuilder(Of TProperty))) As ComplexPropertyBuilder

Type Parameters

TProperty

The type of the property to be configured.

Parameters

propertyName
String

The name of the property to be configured.

complexTypeName
String

The name of the complex type.

buildAction
Action<ComplexPropertyBuilder<TProperty>>

An action that performs configuration of the property.

Returns

The same builder instance so that multiple configuration calls can be chained.

Remarks

When adding a new property, if a property with the same name exists in the complex class then it will be added to the model. If no property exists in the complex class, then a new shadow state complex property will be added. A shadow state property is one that does not have a corresponding property in the complex class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the complex class.

Applies to

ComplexProperty<TProperty>(String, String)

Source:
ComplexPropertyBuilder.cs
Source:
ComplexPropertyBuilder.cs

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.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty> ComplexProperty<TProperty> (string propertyName, string complexTypeName);
abstract member ComplexProperty : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>
override this.ComplexProperty : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>
Public Overridable Function ComplexProperty(Of TProperty) (propertyName As String, complexTypeName As String) As ComplexPropertyBuilder(Of TProperty)

Type Parameters

TProperty

The type of the property to be configured.

Parameters

propertyName
String

The name of the property to be configured.

complexTypeName
String

The name of the complex type.

Returns

An object that can be used to configure the property.

Remarks

When adding a new property, if a property with the same name exists in the complex class then it will be added to the model. If no property exists in the complex class, then a new shadow state complex property will be added. A shadow state property is one that does not have a corresponding property in the complex class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the complex class.

Applies to

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

Source:
ComplexPropertyBuilder.cs
Source:
ComplexPropertyBuilder.cs

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

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder ComplexProperty<TProperty> (string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty>> buildAction);
abstract member ComplexProperty : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
override this.ComplexProperty : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder
Public Overridable Function ComplexProperty(Of TProperty) (propertyName As String, buildAction As Action(Of ComplexPropertyBuilder(Of TProperty))) As ComplexPropertyBuilder

Type Parameters

TProperty

The type of the property to be configured.

Parameters

propertyName
String

The name of the property to be configured.

buildAction
Action<ComplexPropertyBuilder<TProperty>>

An action that performs configuration of the property.

Returns

The same builder instance so that multiple configuration calls can be chained.

Remarks

When adding a new property, if a property with the same name exists in the complex class then it will be added to the model. If no property exists in the complex class, then a new shadow state complex property will be added. A shadow state property is one that does not have a corresponding property in the complex class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the complex class.

Applies to

ComplexProperty<TProperty>(String)

Source:
ComplexPropertyBuilder.cs
Source:
ComplexPropertyBuilder.cs

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.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<TProperty> ComplexProperty<TProperty> (string propertyName);
abstract member ComplexProperty : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>
override this.ComplexProperty : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexPropertyBuilder<'Property>
Public Overridable Function ComplexProperty(Of TProperty) (propertyName As String) As ComplexPropertyBuilder(Of TProperty)

Type Parameters

TProperty

The type of the property to be configured.

Parameters

propertyName
String

The name of the property to be configured.

Returns

An object that can be used to configure the property.

Remarks

When adding a new property, if a property with the same name exists in the complex class then it will be added to the model. If no property exists in the complex class, then a new shadow state complex property will be added. A shadow state property is one that does not have a corresponding property in the complex class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the complex class.

Applies to