I am trying to create model. whilecreating the model i was suggested that i should use navigation property to show foriegn key relation kindly help me to understand this
Loading
I am trying to create model. whilecreating the model i was suggested that i should use navigation property to show foriegn key relation kindly help me to understand this
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jayraj ChhayaPosted Nov 28, 2024, 9:56 AM
Hi Kiran Jagtap,
Navigation properties are essential components of Entity Framework Core that facilitate the representation of relationships between different entities in your data model. They allow you to navigate from one entity to another, effectively linking them through foreign key relationships.
For instance, consider a scenario where you have two entities:
AuthorandBook. AnAuthorcan write multipleBooks, establishing a one-to-many relationship. In yourBookmodel, you would define a navigation property to theAuthorentity, as shown below:Tejas TrivediPosted Nov 28, 2024, 7:50 AM
Navigation property in entity framework represents the relationship between two entities that allows easy navigation of related data. so yes you can use navigation property in your case.