Share via


ComplexCollectionBuilder<TComplex>.ComplexCollection Method

Definition

Overloads

Name Description
ComplexCollection(String, Action<ComplexCollectionBuilder>)

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

ComplexCollection(Type, String, Action<ComplexCollectionBuilder>)

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

ComplexCollection(Type, String, String, Action<ComplexCollectionBuilder>)

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

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<TElement>>>, String, Action<ComplexCollectionBuilder<TElement>>)

Configures a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<TElement>>>, String)

Returns an object that can be used to configure a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<TElement>>>, Action<ComplexCollectionBuilder<TElement>>)

Configures a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>, String, Action<ComplexCollectionBuilder<TElement>>)

Configures a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>, Action<ComplexCollectionBuilder<TElement>>)

Configures a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<TElement>>>)

Returns an object that can be used to configure a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>)

Returns an object that can be used to configure a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>, String)

Returns an object that can be used to configure a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

ComplexCollection<TProperty,TElement>(String, Action<ComplexCollectionBuilder<TElement>>)

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

ComplexCollection<TProperty,TElement>(String, String, Action<ComplexCollectionBuilder<TElement>>)

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

ComplexCollection(String, Action<ComplexCollectionBuilder>)

Source:
ComplexCollectionBuilder%60.cs

Configures a complex collection 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.ComplexCollectionBuilder<TComplex> ComplexCollection(string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder> buildAction);
override this.ComplexCollection : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Complex>
Public Overridable Function ComplexCollection (propertyName As String, buildAction As Action(Of ComplexCollectionBuilder)) As ComplexCollectionBuilder(Of TComplex)

Parameters

propertyName
String

The name of the property to be configured.

buildAction
Action<ComplexCollectionBuilder>

An action that performs configuration of the property.

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

ComplexCollection(Type, String, Action<ComplexCollectionBuilder>)

Source:
ComplexCollectionBuilder%60.cs

Configures a complex collection 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.ComplexCollectionBuilder<TComplex> ComplexCollection(Type propertyType, string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder> buildAction);
override this.ComplexCollection : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Complex>
Public Overridable Function ComplexCollection (propertyType As Type, propertyName As String, buildAction As Action(Of ComplexCollectionBuilder)) As ComplexCollectionBuilder(Of TComplex)

Parameters

propertyType
Type

The type of the property to be configured.

propertyName
String

The name of the property to be configured.

buildAction
Action<ComplexCollectionBuilder>

An action that performs configuration of the property.

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

ComplexCollection(Type, String, String, Action<ComplexCollectionBuilder>)

Source:
ComplexCollectionBuilder%60.cs

Configures a complex collection 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.ComplexCollectionBuilder<TComplex> ComplexCollection(Type propertyType, string propertyName, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder> buildAction);
override this.ComplexCollection : Type * string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Complex>
Public Overridable Function ComplexCollection (propertyType As Type, propertyName As String, complexTypeName As String, buildAction As Action(Of ComplexCollectionBuilder)) As ComplexCollectionBuilder(Of TComplex)

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<ComplexCollectionBuilder>

An action that performs configuration of the property.

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

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<TElement>>>, String, Action<ComplexCollectionBuilder<TElement>>)

Source:
ComplexCollectionBuilder%60.cs

Configures a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TComplex> ComplexCollection<TElement>(System.Linq.Expressions.Expression<Func<TComplex,System.Collections.Generic.IEnumerable<TElement?>?>> propertyExpression, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TElement>> buildAction);
override this.ComplexCollection : System.Linq.Expressions.Expression<Func<'Complex, seq<'Element>>> * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Element>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Complex>
Public Overridable Function ComplexCollection(Of TElement) (propertyExpression As Expression(Of Func(Of TComplex, IEnumerable(Of TElement))), complexTypeName As String, buildAction As Action(Of ComplexCollectionBuilder(Of TElement))) As ComplexCollectionBuilder(Of TComplex)

Type Parameters

TElement

The element type.

Parameters

propertyExpression
Expression<Func<TComplex,IEnumerable<TElement>>>

A lambda expression representing the property to be configured ( blog => blog.Url).

complexTypeName
String

The name of the complex type.

buildAction
Action<ComplexCollectionBuilder<TElement>>

An action that performs configuration of the property.

Returns

An object that can be used to configure the complex collection property.

Applies to

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<TElement>>>, String)

Source:
ComplexCollectionBuilder%60.cs

Returns an object that can be used to configure a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TElement> ComplexCollection<TElement>(System.Linq.Expressions.Expression<Func<TComplex,System.Collections.Generic.IEnumerable<TElement?>?>> propertyExpression, string complexTypeName);
override this.ComplexCollection : System.Linq.Expressions.Expression<Func<'Complex, seq<'Element>>> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Element>
Public Overridable Function ComplexCollection(Of TElement) (propertyExpression As Expression(Of Func(Of TComplex, IEnumerable(Of TElement))), complexTypeName As String) As ComplexCollectionBuilder(Of TElement)

Type Parameters

TElement

The element type.

Parameters

propertyExpression
Expression<Func<TComplex,IEnumerable<TElement>>>

A lambda expression representing the property to be configured ( blog => blog.Url).

complexTypeName
String

The name of the complex type.

Returns

An object that can be used to configure the complex collection property.

Applies to

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<TElement>>>, Action<ComplexCollectionBuilder<TElement>>)

Source:
ComplexCollectionBuilder%60.cs

Configures a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TComplex> ComplexCollection<TElement>(System.Linq.Expressions.Expression<Func<TComplex,System.Collections.Generic.IEnumerable<TElement?>?>> propertyExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TElement>> buildAction);
override this.ComplexCollection : System.Linq.Expressions.Expression<Func<'Complex, seq<'Element>>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Element>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Complex>
Public Overridable Function ComplexCollection(Of TElement) (propertyExpression As Expression(Of Func(Of TComplex, IEnumerable(Of TElement))), buildAction As Action(Of ComplexCollectionBuilder(Of TElement))) As ComplexCollectionBuilder(Of TComplex)

Type Parameters

TElement

The element type.

Parameters

propertyExpression
Expression<Func<TComplex,IEnumerable<TElement>>>

A lambda expression representing the property to be configured ( blog => blog.Url).

buildAction
Action<ComplexCollectionBuilder<TElement>>

An action that performs configuration of the property.

Returns

An object that can be used to configure the complex collection property.

Applies to

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>, String, Action<ComplexCollectionBuilder<TElement>>)

Source:
ComplexCollectionBuilder%60.cs

Configures a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TComplex> ComplexCollection<TElement>(System.Linq.Expressions.Expression<Func<TComplex,System.Collections.Generic.IEnumerable<TElement?>?>> propertyExpression, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TElement>> buildAction) where TElement : struct;
override this.ComplexCollection : System.Linq.Expressions.Expression<Func<'Complex, seq<Nullable<'Element>>>> * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Element>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Complex> (requires 'Element : struct)
Public Overridable Function ComplexCollection(Of TElement As Structure) (propertyExpression As Expression(Of Func(Of TComplex, IEnumerable(Of Nullable(Of TElement)))), complexTypeName As String, buildAction As Action(Of ComplexCollectionBuilder(Of TElement))) As ComplexCollectionBuilder(Of TComplex)

Type Parameters

TElement

The element type.

Parameters

propertyExpression
Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>

A lambda expression representing the property to be configured ( blog => blog.Url).

complexTypeName
String

The name of the complex type.

buildAction
Action<ComplexCollectionBuilder<TElement>>

An action that performs configuration of the property.

Returns

An object that can be used to configure the complex collection property.

Applies to

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>, Action<ComplexCollectionBuilder<TElement>>)

Source:
ComplexCollectionBuilder%60.cs

Configures a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TComplex> ComplexCollection<TElement>(System.Linq.Expressions.Expression<Func<TComplex,System.Collections.Generic.IEnumerable<TElement?>?>> propertyExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TElement>> buildAction) where TElement : struct;
override this.ComplexCollection : System.Linq.Expressions.Expression<Func<'Complex, seq<Nullable<'Element>>>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Element>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Complex> (requires 'Element : struct)
Public Overridable Function ComplexCollection(Of TElement As Structure) (propertyExpression As Expression(Of Func(Of TComplex, IEnumerable(Of Nullable(Of TElement)))), buildAction As Action(Of ComplexCollectionBuilder(Of TElement))) As ComplexCollectionBuilder(Of TComplex)

Type Parameters

TElement

The element type.

Parameters

propertyExpression
Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>

A lambda expression representing the property to be configured ( blog => blog.Url).

buildAction
Action<ComplexCollectionBuilder<TElement>>

An action that performs configuration of the property.

Returns

An object that can be used to configure the complex collection property.

Applies to

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<TElement>>>)

Source:
ComplexCollectionBuilder%60.cs

Returns an object that can be used to configure a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TElement> ComplexCollection<TElement>(System.Linq.Expressions.Expression<Func<TComplex,System.Collections.Generic.IEnumerable<TElement?>?>> propertyExpression);
override this.ComplexCollection : System.Linq.Expressions.Expression<Func<'Complex, seq<'Element>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Element>
Public Overridable Function ComplexCollection(Of TElement) (propertyExpression As Expression(Of Func(Of TComplex, IEnumerable(Of TElement)))) As ComplexCollectionBuilder(Of TElement)

Type Parameters

TElement

The element type.

Parameters

propertyExpression
Expression<Func<TComplex,IEnumerable<TElement>>>

A lambda expression representing the property to be configured ( blog => blog.Url).

Returns

An object that can be used to configure the complex collection property.

Applies to

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>)

Source:
ComplexCollectionBuilder%60.cs

Returns an object that can be used to configure a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TElement> ComplexCollection<TElement>(System.Linq.Expressions.Expression<Func<TComplex,System.Collections.Generic.IEnumerable<TElement?>?>> propertyExpression) where TElement : struct;
override this.ComplexCollection : System.Linq.Expressions.Expression<Func<'Complex, seq<Nullable<'Element>>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Element (requires 'Element : struct)> (requires 'Element : struct)
Public Overridable Function ComplexCollection(Of TElement As Structure) (propertyExpression As Expression(Of Func(Of TComplex, IEnumerable(Of Nullable(Of TElement))))) As ComplexCollectionBuilder(Of TElement)

Type Parameters

TElement

The element type.

Parameters

propertyExpression
Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>

A lambda expression representing the property to be configured ( blog => blog.Url).

Returns

An object that can be used to configure the complex collection property.

Applies to

ComplexCollection<TElement>(Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>, String)

Source:
ComplexCollectionBuilder%60.cs

Returns an object that can be used to configure a complex collection property of the complex type. If the specified property is not already part of the model, it will be added.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TElement> ComplexCollection<TElement>(System.Linq.Expressions.Expression<Func<TComplex,System.Collections.Generic.IEnumerable<TElement?>?>> propertyExpression, string complexTypeName) where TElement : struct;
override this.ComplexCollection : System.Linq.Expressions.Expression<Func<'Complex, seq<Nullable<'Element>>>> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Element (requires 'Element : struct)> (requires 'Element : struct)
Public Overridable Function ComplexCollection(Of TElement As Structure) (propertyExpression As Expression(Of Func(Of TComplex, IEnumerable(Of Nullable(Of TElement)))), complexTypeName As String) As ComplexCollectionBuilder(Of TElement)

Type Parameters

TElement

The element type.

Parameters

propertyExpression
Expression<Func<TComplex,IEnumerable<Nullable<TElement>>>>

A lambda expression representing the property to be configured ( blog => blog.Url).

complexTypeName
String

The name of the complex type.

Returns

An object that can be used to configure the complex collection property.

Applies to

ComplexCollection<TProperty,TElement>(String, Action<ComplexCollectionBuilder<TElement>>)

Source:
ComplexCollectionBuilder%60.cs

Configures a complex collection 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.ComplexCollectionBuilder<TComplex> ComplexCollection<TProperty,TElement>(string propertyName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TElement>> buildAction) where TProperty : System.Collections.Generic.IEnumerable<TElement>;
override this.ComplexCollection : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Element>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Complex>
Public Overridable Function ComplexCollection(Of TProperty As IEnumerable(Of TElement), TElement As IEnumerable(Of TElement)) (propertyName As String, buildAction As Action(Of ComplexCollectionBuilder(Of TElement))) As ComplexCollectionBuilder(Of TComplex)

Type Parameters

TProperty

The type of the property to be configured.

TElement

The element type.

Parameters

propertyName
String

The name of the property to be configured.

buildAction
Action<ComplexCollectionBuilder<TElement>>

An action that performs configuration of the property.

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

ComplexCollection<TProperty,TElement>(String, String, Action<ComplexCollectionBuilder<TElement>>)

Source:
ComplexCollectionBuilder%60.cs

Configures a complex collection 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.ComplexCollectionBuilder<TComplex> ComplexCollection<TProperty,TElement>(string propertyName, string complexTypeName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<TElement>> buildAction) where TProperty : System.Collections.Generic.IEnumerable<TElement>;
override this.ComplexCollection : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Element>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ComplexCollectionBuilder<'Complex>
Public Overridable Function ComplexCollection(Of TProperty As IEnumerable(Of TElement), TElement As IEnumerable(Of TElement)) (propertyName As String, complexTypeName As String, buildAction As Action(Of ComplexCollectionBuilder(Of TElement))) As ComplexCollectionBuilder(Of TComplex)

Type Parameters

TProperty

The type of the property to be configured.

TElement

The element type.

Parameters

propertyName
String

The name of the property to be configured.

complexTypeName
String

The name of the complex type.

buildAction
Action<ComplexCollectionBuilder<TElement>>

An action that performs configuration of the property.

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