Brosteins

Developers, Technology Evangelists, Bros.

Tag: repository

Why To Use the Repository Pattern

I felt it was time to update and clarify some previous thoughts on the use of the Repository pattern. Previously, I had indicated that a Repository did not provide much benefit, as ORMs act as a Repository. Although true, I had a very specific context in mind when saying this – anemic domain models. When you’re working with anemic domain…

Share

Why Not to Use the Repository Pattern

The Repository pattern, as described by Edward Hieatt and Rob Mee in Martin Fowler’s Patterns of Enterprise Application Architecture, is a layer of abstraction that is used to mediate interactions between the domain and the data mapping (ORM) layers. You can use a repository to minimize the duplicate query logic that a can arise in larger domains. Often times, I…

Share