10 March 2012

Automate Entity Framework 4.x mocking using T4 templates - part 2

  In my previous post I described how to use T4 templates to customize the Entity Framework(EF) code generation in order to introduce EF testability. My test code sample showed a very simple way to inject data and test the business logic without using a physical database. However the code that injects the test data could do with a bit of automation itself.