What is a Shadow Property in EF Core?
Updated Apr 28, 2026
Short answer
A Shadow Property is a property that exists in the database schema and EF Core's tracking model, but does not exist in the C# entity class.
Deep explanation
Configured via Fluent API. The values are maintained purely in the Change Tracker. They are highly useful for audit fields (CreatedDate, UpdatedBy) or foreign keys where you want to keep the C# domain model clean of database-specific logic.
Real-world example
Automatically setting an UpdatedAt column during SaveChanges using an interceptor without needing to add an UpdatedAt property to every C# class.
Common mistakes
- Trying to access shadow properties directly in C# using standard property syntax (`blog.LastUpdated`), which won't compile.
Follow-up questions
- How do you query against a shadow property?