About EF4...
Please do not use it in a large project, with many tables and lots of data and many users. I've made this mistake and now I'm looking for a replacement.
1-Bad query generation, especially in large TPT hierarchies. Be prepared for a 5000 line query for a hierarchy of 15 tables!
2-Extremely slow designer when the number of tables grows. 45 Seconds just to collapse/expand an entity in a model with 240 entities.
3-Serious problem with x-to-many relationships. Suppose you have Order
and Customer
entity. Each order has a Customer and each Customer has many Orders. There is a property, named Orders
in Customer
class that will be populated without you ever actually needing that data. This meant, in our system, that collections up to 1800000 entities be fetched for no actual reason. When this happens inside a transaction with Snapshot isolation level... that brings the whole system to failure. There is no actual solution to this problem, one that has no serious drawbacks. Just read the DataObjects.Net's documentation and see how they've takled this problem. I found that paying 200 or 500 euros is nothing compared to what you get. I may even get the version with source code.
If I'm unable to integrate my system with DO.Net, I'll look for another one, but this EF thing, it has to go!