What is a Scalar and Navigation property in Entity framework ?

 Posted by Akiii on 10/30/2012 | Category: ASP.NET Interview questions | Views: 10743 | Points: 40

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.

Thanks and Regards

Asked In: MSDN | Alert Moderator 

Comments or Responses

Login to post response