Wednesday, August 12, 2009

Is EF an ORM

I just read the "vote of no confidence" agains the Entity Framework (EF).

I have previously discarded the framework for the fact that it didn't support POCO. They have tried to recover by implementing IPOCO but its a workaround that doesn't really fit the issue of not supporting POCO. Not supporting POCO means that Entity Framework introduces dependencies to your domain model of Entity Framework that are not necessary and forces you to use your domain model in a certain way.

So why is this bad? A few extra lines of code in an entire application isn't too bad. It really isn't, but the purpose of the ORM is to create a persistent ignorant model. If we take plain as an example plain would have to be changed to support EF. Suddenly the nice layering would be broken because persistance logic would have to be applied directly in the domain logic or the UI layer.

As far as I understand version 4.0 of Entity Framework supports persistent ignorance better.