For the last month I have been spending my spare time porting the awesome Java framework QI4J to .NET. QI4J is the brain child of Rickard Öberg and Niclas Hedhman and it attempts to enable Composite Oriented Programming for the Java platform. (For more info regarding Composite Oriented Programming see the QI4J website: http://www.qi4j.org/ ) I’m well…More
Entity Framework 4 – Entity Dependency Injection
When dealing with a fat domain model, there is often a need to be able to inject different services into your entities. e.g. you might want to inject some domain service like “ITaxCalcualtorService” or an infrastructure service like “IEmailNotificationService” into your entities. If we rely completely on eager loading, then this is not a big…More
Entity Framework 4 – “Almost” POCO
This is a short rant.. I have been very impressed with EF4 so far, but I’ve now found out that EF4 will NOT support enums. I find this is very strange, I can’t see how Microsoft can claim POCO support and not support one of the most common code constructs. More info here: http://social.msdn.microsoft.com/Forums/en-US/adonetefx/thread/7659feab-d348-4367-b2cd-0456b20262fe Someone might claim that…More
Entity Framework 4 – Using Eager Loading
When Linq To Sql was released we were told that it did support eager loading. Which was a bit misleading, it did allow us to fetch the data we wanted upfront, but it did so by issuing one database query per object in the result set. That is, one query per collection per object, which…More
Entity Framework 4 – Managing inverse properties
[EDIT] I was wrong! It is perfectly possible to do one directional associations in EF4 and POCO mode. You simply have to manually remove the “ <NavigationProperty ..” tags from your mapping files. Awesome work EF4 design team :-) [/EDIT] Original post: To my surprise I’ve found out that Entity Framework 4 don’t support one…More
