This could be my ineptitude but I have now wasted nearly two days trying to upgrade a Linq to SQL project to EF 4.0.
What I am finding out is that I am writing far more code not less for starters when dealing with related tables. I know Microsoft will say that they only employ the best of the best, and will have justifications for things like the IRelatedEnd. In linq to SQL you have an AddRange for your EntitySet, in EF 4.0 you only have an add method, so you have to create your own for loop each and every time. The EntityCollection is a pain in the backside to use in nested table scenarios .
I am that annoyed this morning, I have just reluctantly resolved to go back to a previous build before EF 4.0. I don't care what anybody says, but the EF object model is horrible, no in fact it is atrocious. If you are a new user then you will learn it because you do not know any better, but be warned. EF 4.0 uptake will not be as rapid as you might think. I best stop writing in case expletives start to present themselves as worthy of communicating my fury, but it is difficult to be or sound objective when you are as annoyed as I am with EF 4.0. I will never get the time back
In fact I think where things went wrong, was when Anders Hejlsberg and the C# design team left the Linq to SQL project. Things went from a lovely abstraction that was a little limited to something that is not so limited but is an absolute pain to use. I am now going to consider using nHibernate as EF 4 is a dissapointment.