What are the Navigation Properties in Entity Framework

后端 未结 3 1758
刺人心
刺人心 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:04

    Navigation Property is mainly used for Foreign key relationship in EF. i.e. User to Roles, product to categories etc.

    so if you have Order with OrderLines, navigation property will say Order_OrderLineItems and you can access complete line items associated with it.

    have a look some of the explanation here, What are Navigation Properties in Entity Framework for?

提交回复
热议问题