OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>.PrimitiveCollection<TProperty> 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.
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.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> PrimitiveCollection<TProperty> (System.Linq.Expressions.Expression<Func<TDependentEntity,TProperty>> propertyExpression);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<TProperty> PrimitiveCollection<TProperty> (System.Linq.Expressions.Expression<Func<TDependentEntity,TProperty>> propertyExpression);
override this.PrimitiveCollection : System.Linq.Expressions.Expression<Func<'DependentEntity, 'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
override this.PrimitiveCollection : System.Linq.Expressions.Expression<Func<'DependentEntity, 'Property>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.PrimitiveCollectionBuilder<'Property>
Public Overridable Function PrimitiveCollection(Of TProperty) (propertyExpression As Expression(Of Func(Of TDependentEntity, TProperty))) As PropertyBuilder(Of TProperty)
Public Overridable Function PrimitiveCollection(Of TProperty) (propertyExpression As Expression(Of Func(Of TDependentEntity, TProperty))) As PrimitiveCollectionBuilder(Of TProperty)
Type Parameters
- TProperty
The type of the property to be configured.
Parameters
- propertyExpression
- Expression<Func<TDependentEntity,TProperty>>
A lambda expression representing the property to be configured (
blog => blog.Url
).
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