What is a Scalar and Navigation property in Entity framework ?

Scalar property are properties whose actual values are contained in the entity. A property of an entity that maps to a single field in the storage model.
E.g. Student entity has scalar properties e.g. StudentId, StudentName. These correspond with the Student table columns.

Navigation property is used to navigate through relations in data. It allows you to navigate from one entity to a “connected” entity.
E.g. if a user is connected to a role, you can use the “Role” navigation to read and inspect the role associated with that user. Basically it is equivalent to a foreign key relationship in a database.

Leave a Reply

Your email address will not be published. Required fields are marked *