Archives
-
EF Code First : Add foreign key relationship
In the first article, I show how to create a database with one table using Code First. You can read it here : EF Code First : Simple sample Now, we want to add a new table to work with foreign key. Let’s add a new Project class like this : public class Project { [...]
Jan 23rd, 2012 | Filed under EF -
Series of articles about EF Code First
As I begin to work a lot with Entity Framework Code First, I decide to write some articles to share some samples that could be useful for beginners. Here is how I think to organize it : 1 – First sample : A very simple example on how to create a database with a table [...]
Jan 19th, 2012 | Filed under EFTags: Code Fluent, Data Annotations, EF CodeFirst, Entity Framework, Example, Sample, TPH, TPT, Tutorial -
EF Code First : Simple sample
You heard about Entity Framework and want to try it. Let’s start with a very simple example. We will create a Console Application, add a class Person and generate the database from this class. Open Visual Studio and create a Console Application. I called mine EFFirstSample. Now, you have to allow Code First on your [...]