Ef Code First, how can i map an existing foreign key to a navigation property with code first


0 votes
asked Feb 14, 2016 by Uselucore (850 points)
I'm using code first to create application of customer management.

3 Answers

0 votes
answered Apr 30, 2016 by v_said (560 points)
selected May 2, 2016 by Pellitteri
 
Best answer
In the file MyContext
commented May 1, 2016 by guyton (1,010 points)
Could someone explain what this means. I explained it in details on a little article
commented May 2, 2016 by Pellitteri (100 points)
For details look here
0 votes
answered Apr 30, 2016 by gurand (520 points)

We just created our first one to many relationship using EF Code First.
So let's modify our Project class to use this property vs. The first one was created because of our property Manager Id.
0 votes
answered Apr 30, 2016 by cronobleThis (280 points)
Have a look at Associations in EF Code First: Part 5 One-to-One Foreign ... use it permanently, I kind of depend on it now :)
But the problem is that you will lose the last value in the array

What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!







...