Click here to Skip to main content
15,881,248 members
Articles / Programming Languages / C#

EF Code First: Add a Foreign Key relationship

Rate me:
Please Sign up or sign in to vote.
4.79/5 (17 votes)
24 Jan 2012CPOL3 min read 245.5K   25  
Shows how to add foreign key constraints using Entity Framework Code First.
No downloads associated with this content

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
France France
I'm coding in .Net since 9 years, most with ASP.Net and SharePoint and a little using WPF, MVC, Windows Phone 8 and WinRT technology.
I have learned so much reading others experience and tutorials, or tips so I try to do the same, keeping learning from others of course.
You can also find my blog here : http://sharemstips.wordpress.com/

Comments and Discussions