The Repository Factory is a lightweight O/R Mapper created by the Patterns and Practices team. It was part of the Web Service Factory but the team decided to pull it out and make it separate and usable by all.
Before I go much further I want to say I have never used an O/R Mapper on any application. Even though there are those here where I work who do use them, and they remind how disappointed that Microsoft does not include O/R Mapping in .Net. For a while MS promised us ObjectSpaces to be part of .Net 2.0 but it never made the final cut. Currently ADO.Net Entity framework is due to be released in .Net 3.5. This framework could serve as an O/R Mapper, but from what I here it might be a bit lacking.
Anyways back to the Repository Factory. There were some things i like and others i did not. First the items I found nice.
- It can generate all you business entities, and data access classes.
- It uses interface when creating repositories allowing for loose coupling.
- The mapping of interfaces to concrete classes is handled in the config file.
- It handles the mapping of entities to data classes.
- I didn't like the fact I was forced to use stored procedures. I used to be a huge fan of stored procedures, but after noticing how much extra complexity stored procs add to deployments.
- Entities same as database table. What if I have an entity that does not map back to one table, but multiple tables.
- Lack of complex entities.
So check out Repository Factory and the screencasts.
Now playing: Nickelback - Animals