Repository
The ubiquitous repository pattern as it is implemented by RCommon.
There has been much said about the repository pattern over the years. Perhaps the most influential advocate for the repository pattern is Martin Fowler.
Through the repository pattern, we are able to implement a variety of useful techniques such as eager loading, pagination, and unit of work (UoW).
Persistence Features
RCommon provides a variety of strategies for persistence. Our opinion is that object relational mappers (ORM's) can be divided into three categories with distinct but not exclusive feature sets. Categorically, these features have pros and cons but in general, you find that the more features an ORM has, the easier it is to do certain things programmatically which ultimately saves you time. However, those extra features often cost you performance.
Ultimately you are choosing an ORM based on your architectural AND operational needs. RCommon has implemented three of the most widely adopted ORMs available today - one from each category which ultimately gives you the flexibility you need to adapt as your needs change which frees you from much of the heartbreak of "Day-Zero" decisions.
Feature | Graph Mapper | Linq Mapper | SQL Mapper |
---|---|---|---|
Implements IQueryable | ✅ | ✅ | ❌ |
Eager Loading | ✅ | ✅ | ❌ |
Lazy Loading | ✅ | ❌ | ❌ |
Graph Persistence (nested entities) | ✅ | ❌ | ❌ |
Change Tracking | ✅ | ❌ | ❌ |
ACID Transactions | ✅ | ✅ | ✅ |
Custom SQL/Queries | ✅ | ✅ | ✅ |
Fluent Entity Mapping | ✅ | ✅ | ✅ |
Persistence Events | ✅ | ✅ | ✅ |
Unit of Work Support | ✅ | ✅ | ✅ |
Supported Object Relational Mappers (ORMs)
ORM | Graph Mapper | Linq Mapper | SQL Mapper |
---|---|---|---|
Entity Framework Core | ✅ | ✅ | ✅ |
Mongo DB Client (soon) | ✅ | ✅ | ❌ |
Linq2Db | ❌ | ✅ | ✅ |
Dapper | ❌ | ❌ | ✅ |
Last updated