What are the Navigation Properties in Entity Framework

后端 未结 3 1775
刺人心
刺人心 2021-02-20 11:29

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 Navigat

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-20 12:09

    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.

提交回复
热议问题