Test Driven Development sounds great. Unfortunately it’s very easy to shrug it off in the face of tight deadlines and entrenched management who want results early and often and aren’t comfortable with an initial investment defining some structure and getting buy-in from the team.
This in mind, when I ran across Scott Guthrie’s mention of Entity Framework 4’s CTP for Code First Development I was immediately curious to see if this could be a fundamental shift to the selling point for TDD.
I grabbed the CTP and fired up Visual Studio in a few minutes of free time I had. I was immediately impressed and I can see some cool things to do with it. What I was more excited about, though, is the amount of time that can be diverted from initial database design for entity generation to picking your TDD strategy and configuring your project. As a bonus it is much quicker to alter your data classes since you don’t have to re-map your entities (and correct FK naming quirks in Linq2Sql).
Even if you still don’t care to implement TDD in your projects, the time saving and quick iteration of data design offered from Code First is impressive. Give it a look.
Check out the MSDN article to read more about the new Code First design strategy.