Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the Navigation Properties in Entity Framework

I am new to Entity Framework. When the Visual Studio creates Model diagram we can see mainly two things in Entities.Propertie and Navigation Properties,So what are these Navigation Properties? How to use them?

like image 714
unique Avatar asked Jul 16 '12 16:07

unique


1 Answers

Navigation properties represents related entites to the principal entity. Foreign Keys are usually represented by navigation properties.

Ex : if you have two tables Invoice and invoice items and those tables have a relation 1-> many so you'll find a navigation property in invoice entity that lists all invoice items related to an invoice.
Hope it helps.

like image 113
HichemSeeSharp Avatar answered Sep 30 '22 00:09

HichemSeeSharp