|I've found what I've been doing wrong Dave. When I've been adding the Entity Data model when I started the project, I've been deleting the two .tt template files and setting the code generation strategy in the edmx properties to 'default'. This hasn't been generating the (correct) code to use dBSet. I've still got a lot to learn yet about this, as it's opened a few more cans of worms for me, (For example, what happened to my 'AddObject' methods?)
This highlights my original point. I'm a freelance developer, and have been for about 10 years now. I work by myself, and I have no-one to bounce ideas off, or show me my mistakes. I learnt EF by buying Julia Lerman's book and studying enough of it to get my current project up and running, but not going any further. When I worked for a software house in England, I used to dread code review day, but I can see now how useful it was.
I know I'm still missing a lot, and I would be grateful if you could point me to a good tutorial about the correct way to deal with Entity Framework, and .tt files and all.
Thanks for all your patience Dave, it's been much appreciated.