Book Review: Programming Entity Framework, Second Edition

by mosessaur| 02 January 2011| 0 Comments

About the book

Title: Programming Entity Framework 2nd Edition
Publisher: O'Reilly Media
URL: http://oreilly.com/catalog/9780596807252
Book website: http://learnentityframework.com/
ISBN: 978-0-596-80726-9
Chapters: 27 + 3 Appendices | ~900 pages
Author:
Author’s blog: http://thedatafarm.com/blog/
Overall rating: 9.70 out of 10
This is the second edition of the book totally revised for Entity Framework 4.0 on VS2010 1st edition was released Jan 2009. this 2nd new edition released August 2010.

Personal Opinion

I can’t do anything but strongly recommend this book. It is almost everything you might need about Entity Framework 4.0. Great walkthroughs and samples in C#. However there are few snippet in VB.Net that shows different syntax of doing things between C# & VB.Net.

More...

Getting Started with Entity Framework 4.0 Screencast Recorded session from Cairo Code Camp - Part 4

by mosessaur| 07 August 2010| 0 Comments

About Part 4

Fourth part is about 10 min in length. Covers how to implement table per hierarchy inheritance model (TPH) with Entity Framework 4.0

More...

Inheritance and Associations with Entity Framework Part 3

by mosessaur| 01 October 2008| 1 Comments

On part 1 and part 2 I explored how to apply 2 different inheritance models (TPH & TPT) in Entity Framework. In this part I'm going to demonstrate associations between 2 base entities. And how to filter end properties to return specific type (sub entity). Download the sample.

Review Association Ends:

In previous part when I added department tables to the entity model diagram, an associations between Person and Department entities was automatically defined. This relation actually demonstrate the relation between Administrator and Department. It is one-to-many relationship where one person can be administrator of one or many departments.

A collection of Departments is created on Person table and therefor it is inherited on all sub entities! But this make no sense, as a student or instructor has nothing to do with this collection. Beside on the other end at Department a property of type Person is created -I renamed it to Administrator-, while this shouldn't be just any Person, this Person must be of type Administrator.

A few modification should take place in here. The existing association should be deleted and the association ends should be define between Administrator Entity and Department Entity. To do that follow the following steps:

More...