This is not a project on its own, but rather just a series of articles inspired by the autofac Inversion of Control container and eXpress Persistent Objects ORM.
When viewed separately, they are wonderful specialized development tools. Using them together results in some curious possibilities and opportunities.
Note: Articles are presented in the chronological order and are based on code prototypes using XPO ORM and Autofac IoC. However, these are just the concepts and one should be able to apply them to any IoC and XPO combination as long as the components have the required capabilities.
Additionally, I’ve included links to external articles that have certainly played a great role here.
- How to avoid tight IoC coupling in non-deterministic resolution scenarios?
- Enabling Rich Domain Models with Services (by Nicholas Blumhardt)
- How to decouple your code from ORM (XPO) while granting it the power to IoC?
- How to inject ORM with some IoC?
- Reusable Domain Models Strike Back (by DevExpress XAF team)
- How to use ORM (XPO), IoC, C# 3.5 syntax, Linq and .NET 2.0 together?
- How to implement unit-testable abstraction and reusable domain models with IoC + ORM?
- XPO-related changes that are needed to make the ORM+IoC samples work.
ORM IRepository series:
- Implementing ORM-independent Linq queries
- Options of separating queries from the ORM Repository
- Linq queries with parameters for your ORM IRepository
If you have any comments, questions or critics, please, feel free to drop a line.

7 Responses to “ORM+IoC”