OwnedNavigationBuilder.PrimitiveCollection Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
PrimitiveCollection(String) |
Returns an object that can be used to configure a property of the owned type where that property represents a collection of primitive values, such as strings or integers. 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 owned type where that property represents a collection of primitive values, such as strings or integers. 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 owned type where that property represents a collection of primitive values, such as strings or integers. If no property with the given name exists, then a new property will be added. |
PrimitiveCollection(String)
- Source:
- OwnedNavigationBuilder.cs
- Source:
- OwnedNavigationBuilder.cs
Returns an object that can be used to configure a property of the owned type where that property represents a collection of primitive values, such as strings or integers. If no property with the given name exists, then a new property will be added.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder PrimitiveCollection (string propertyName);
abstract member PrimitiveCollection : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder
override this.PrimitiveCollection : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder
Public Overridable Function PrimitiveCollection (propertyName As String) As PrimitiveCollectionBuilder
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 entity type. This overload cannot be used to add a new shadow state property.
Applies to
PrimitiveCollection(Type, String)
- Source:
- OwnedNavigationBuilder.cs
- Source:
- OwnedNavigationBuilder.cs
Returns an object that can be used to configure a property of the owned type where that property represents a collection of primitive values, such as strings or integers. If no property with the given name exists, then a new property will be added.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder PrimitiveCollection (Type propertyType, string propertyName);
abstract member PrimitiveCollection : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder
override this.PrimitiveCollection : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder
Public Overridable Function PrimitiveCollection (propertyType As Type, propertyName As String) As PrimitiveCollectionBuilder
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 property, if a property with the same name exists in the entity class then it will be added to the model. If no property exists in the entity class, then a new shadow state property will be added. A shadow state property is one that does not have a corresponding property in the entity class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the entity class.
Applies to
PrimitiveCollection<TProperty>(String)
- Source:
- OwnedNavigationBuilder.cs
- Source:
- OwnedNavigationBuilder.cs
Returns an object that can be used to configure a property of the owned type where that property represents a collection of primitive values, such as strings or integers. If no property with the given name exists, then a new property will be added.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<TProperty> PrimitiveCollection<TProperty> (string propertyName);
abstract member PrimitiveCollection : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<'Property>
override this.PrimitiveCollection : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<'Property>
Public Overridable Function PrimitiveCollection(Of TProperty) (propertyName As String) As PrimitiveCollectionBuilder(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 entity class then it will be added to the model. If no property exists in the entity class, then a new shadow state property will be added. A shadow state property is one that does not have a corresponding property in the entity class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the entity class.
Applies to
Entity Framework