EF Core 11.0: Temporal Period Properties Backed by CLR Properties
Read OriginalThis article covers a new feature in EF Core 11.0 Preview 4 that enables mapping SQL Server Temporal Table period columns (PeriodStart and PeriodEnd) to regular CLR properties on entities, replacing the previous shadow property approach. It includes code examples showing how to configure the DbContext with HasPeriodStart and HasPeriodEnd lambdas, define entity classes with plain DateTime properties, and perform operations like adding, updating, and querying temporal data without using EF.Property. The improvement simplifies filtering, ordering, and projecting temporal values directly from entity instances.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser
Top of the Week
No top articles yet