Skip to content

Allow temporal Period properties to be mapped to CLR properties (i.e. not shadow properties) #26463

@FransBouma

Description

@FransBouma

(.NET 6, EF Core 6 RC2/latest)

I generate the fields in an entity which are mapped to the period fields in a temporal table as readonly properties and map them as normal fields, however when using them in a query I get:

System.InvalidOperationException : Period property 'Employee.ValidFrom' must be a shadow property.
   at Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerModelValidator

Why do the period properties have the requirement to be shadow properties? I could generate them as such but IMHO it sucks for the user as to use them they have to fall back to string based names for the fields...

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions