Skip to content

Document temporal period properties mapped to CLR properties#5336

Merged
roji merged 2 commits intodotnet:preview.4from
roji:roji/document-temporal-clr-property-mapping
Apr 16, 2026
Merged

Document temporal period properties mapped to CLR properties#5336
roji merged 2 commits intodotnet:preview.4from
roji:roji/document-temporal-clr-property-mapping

Conversation

@roji
Copy link
Copy Markdown
Member

@roji roji commented Apr 16, 2026

Documents the new EF Core 11 feature from dotnet/efcore#38110 that allows temporal period properties (PeriodStart/PeriodEnd) to be mapped to CLR properties on the entity type, instead of being restricted to shadow properties.

Changes

entity-framework/core/providers/sql-server/temporal-tables.md

  • New "Mapping period columns to CLR properties" section with:
    • Lambda-based HasPeriodStart/HasPeriodEnd configuration example
    • String-based configuration alternative
    • ValueGenerated.OnAddOrUpdate behavior note
    • LINQ query example using direct property access
  • Updated existing text to note shadow properties are the default, with links to the new section

entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md

  • New "Temporal period properties mapped to CLR properties" subsection under SQL Server, with code examples and link to the full temporal tables doc

Copilot AI review requested due to automatic review settings April 16, 2026 05:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documents the EF Core 11 capability to map SQL Server temporal period columns (PeriodStart/PeriodEnd) to CLR properties (instead of shadow properties), improving direct access in queries and entities.

Changes:

  • Added a “Temporal period properties mapped to CLR properties” section to EF Core 11 “What’s New” (with mapping + query examples).
  • Updated SQL Server temporal tables docs to clarify shadow properties are the default and added a new section showing CLR mapping configuration and usage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md Adds an EF Core 11 “What’s New” subsection describing CLR-mapped period properties with examples and a link to detailed docs.
entity-framework/core/providers/sql-server/temporal-tables.md Updates narrative to mention CLR mapping support and adds a dedicated section describing configuration options and query usage.

Comment thread entity-framework/core/providers/sql-server/temporal-tables.md
Comment thread entity-framework/core/providers/sql-server/temporal-tables.md Outdated
Copy link
Copy Markdown
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to target main instead of preview.4?

@roji
Copy link
Copy Markdown
Member Author

roji commented Apr 16, 2026

Good catch.

@roji roji changed the base branch from main to preview.4 April 16, 2026 06:58
roji and others added 2 commits April 16, 2026 08:59
Document the new EF Core 11 feature that allows temporal period
properties (PeriodStart/PeriodEnd) to be mapped to CLR properties
instead of being restricted to shadow properties.

Updates:
- temporal-tables.md: New 'Mapping period columns to CLR properties'
  section with lambda and string-based configuration examples
- temporal-tables.md: Updated existing text to note shadow properties
  are the default, with links to the new section
- whatsnew.md (EF Core 11): New subsection under SQL Server

Relates to dotnet/efcore#38110

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roji roji force-pushed the roji/document-temporal-clr-property-mapping branch from 4190711 to 3861454 Compare April 16, 2026 06:59
@roji roji merged commit 204e115 into dotnet:preview.4 Apr 16, 2026
4 checks passed
@roji roji deleted the roji/document-temporal-clr-property-mapping branch April 16, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants