Shadow properties
Going one step further from private properties, in a well-defined model, it may make sense to hide certain properties from the developers so that they do not make unwanted changes to them, consciously or not.
Historically, Entity Framework, like most ORMs, has three models:
- POCO model: This represents the .NET classes and their properties and references
- Database model: This represents the tables, views, and columns (in the case of relational data stores) where data is actually stored
- Mapping model: This model binds the two preceding models; this is where we say that the
MyEntity
class is to be stored in theMY_ENTITY
table and theId
property goes into theMY_ENTITY_ID
column
Note
Entity Framework used to call these models Conceptual ...
Get Entity Framework Core Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.