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 [...]
-
[EF Code First] What happen to my Person table ?
I’m writing an article about EF Code Fisrt and i get a strange behaviour. I create a simple class Person : public class Person { public int PersonId { get; set; } public string LastName { get; set; } public string FirstName { get; set; } public DateTime BirthDate { get; set; } } I [...]
-
Entity Framework Code First by Julie Lerman and Rowan Miller
If you are looking for a great book to learn more about EF Code First, how it works and how to tune it, here is a really good book : Entity Framework Code First by Julie Lerman and Rowan Miller I just finished it and I learned lots of things about configuring inheritance, mapping, caching [...]
Dec 6th, 2011 | Filed under EFTags: Books, EF CodeFirst -
[EF] The specified type member ‘Property’ is not supported in LINQ to Entities
I’m playing with ASP.Net MVC and Entity Framework and I just encountered this error : “The specified type member ‘Property’ is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.“. I’m trying to display a list of posts in my view (yes, it is MVC) and my post [...]
-
Mapping O/R et les procédures stockées
J’ai trouvé cette discussion en surfant un peu. Je la trouve intéressante, il ne s’agit pas ici d’un article mais plutôt d’une question posée par le blogger et la discussion se poursuit grâce aux commentaires. Plusieurs personnes ayant répondu à ce post ont proposés différents liens pour que l’on puisse explorer le sujet. O/R mappers/Sprocs [...]
Aug 24th, 2006 | Filed under O/R Mapper