views:

250

answers:

2

MS's entity framework is considered among developers in the agile community to inhibit test driven development. It was famously attacked by an influential group of .Net developers for not being a true reflection of the principles of the agile movement.

What are the main drawbacks that an agile developer faces when using the entity framework?

+4  A: 

It's because it has no mocks - it encourages you to base your app around objects that directly ping the database, with no way to simulate it. One of the primary tenets of agile development is that tests are fast, so that running them is painless and you can continually be testing your code, but with EF, your objects always ping a database and you have to do horrible hacks to get around the generated code that EF makes for you for tests.

Paul Betts
Do you know of an open source project that could serve as an example where the business logic is separately tested?
Andreas Huber
NHibernate is the obvious project. There are others, I just don't have experience with them.
Jimmy McNulty
@Jimmy You said the magic word "NHibernate." You deserve a cookie.
Justice
SubSonic is another one.
Will
A: 

In addition to not including a framework for Mocks, it also encourages through UI hints (intellisense) writing the tests after the code you want to test.

Rob Allen