You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.InvalidOperationException: The property 'Size_Height' cannot be added to the type 'DashboardItem' because there was no property type specified and there is no corresponding CLR property or field. To add a shadow state property the property type must be specified.
at Microsoft.EntityFrameworkCore.Metadata.Internal.InternalEntityTypeBuilder.GetOrCreateProperties(IReadOnlyList`1 propertyNames, Nullable`1 configurationSource, IReadOnlyList`1 referencedProperties, Boolean required, Boolean useDefaultType)
at Microsoft.EntityFrameworkCore.Metadata.Internal.InternalEntityTypeBuilder.PrimaryKey(IReadOnlyList`1 propertyNames, ConfigurationSource configurationSource)
at Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder.HasKey(String[] propertyNames)
I want create a primary key with all properties in value object
I implemented the following entities:
With this configuration
This configuration generate following exception
I pushed this example in
https://github.com/ivanrodriguezfernandez/ef-core-owned-types
Further technical details
EF Core version: 2.2.6
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: NET Core 2.2
Operating system:
IDE: Visual Studio 2019 16.2.5
The text was updated successfully, but these errors were encountered: