What is navigation property in entity framework? [Resolved]

Posted by Kumarkrishna184 under ASP.NET MVC on 12/15/2015 | Points: 10 | Views : 1396 | Status : [Member] | Replies : 4
What is navigation property in entity framework?

Thanks and Regards,
Krishna Kumar



Responses

Posted by: Rajnilari2015 on: 12/15/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
In the case of a RDMBS we have various kinds of relationships among the entities like

- One to One
- One to Many
- Many to Many.

We create those relations among the tables via PK and FK . These key's becomes the navigational keys for the tables to establish the relationships among themselves. (you can refer to an answer given by me in DNF forum about that http://www.dotnetfunda.com/forums/show/20876/database-management-system ).

In a similar way, in EF, a navigation property allows to navigate from one entity to another entity. A few day's back I have given answer to one of your question in DNF ( http://www.dotnetfunda.com/forums/show/20879/what-is-code-first-migrations-in-mvc-and-what-is-procedure-to-do-code ).

In that example , the below line of code does the navigation

modelBuilder.Entity<Department>().HasRequired(d => d.Department).WithMany().HasForeignKey(e => e.EmpID);


For more info: https://msdn.microsoft.com/en-us/library/bb738520.aspx

Hope this helps.

--
Thanks & Regards,
RNA Team

Kumarkrishna184, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Webmaster on: 12/15/2015 [Administrator] HonoraryPlatinum | Points: 50

Up
0
Down

Resolved
Dear Kumarkrishna184,

We have already sent an email on December 10 with the login credentials of www.myfunda.net where you can login and download jQuery Tips & Tricks subscription.

The subject of the email is "Re: Appreciation", we just replied to the same email you had sent to us. In case you have not received in Inbox, kindly check your Spam or Junk folder as sometimes email goes into those folders. In case you have not received the email, let us know.

Kindly ask prizes related questions in its announcement thread http://www.dotnetfunda.com/forums/show/20862/congratulations-to-all-monthly-winners-of-december-2015 so that it can be addressed quickly.

Thanks

Best regards,
Webmaster
http://www.dotnetfunda.com

Kumarkrishna184, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kumarkrishna184 on: 12/15/2015 [Member] Starter | Points: 25

Up
0
Down
Wow Sir, Your way of explaining is very simple that' s reason i am able to understand very easily.Thanks sir......

Thanks and Regards,
Krishna Kumar

Kumarkrishna184, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kumarkrishna184 on: 12/15/2015 [Member] Starter | Points: 25

Up
0
Down
Sorry Sir asking to you a personal question,Have you got your dotnetfunda.com Prize. I have also won the dotnetfunda.com jquery material prize. But till i did not get the prize. Sir, What is procedure to get the prize after winning? Before 4-5 days, I have submited the form after winning the prize.

Thanks and Regards,
Krishna Kumar

Kumarkrishna184, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response