In the first version of the Entity Framework code generation was implemented internally using CodeDom . The Entity Framework APIs provided some hooks for customizing the generation, but customizing was tricky, relatively inflexible and wasn’t integrated...