I am trying to figure out the repository pattern for .NET. I think I have a pretty decent understanding of it, but I still don't feel comfortable using it.
I have googled for this topic, but found some advanced topics along with the repository pattern. What I am looking for is a basic knowledge of the concept, then I can build on it. With that said, can I get a recommendation of some good articles on the repository pattern?
Thanks
The Repository pattern. Repositories are classes or components that encapsulate the logic required to access data sources. They centralize common data access functionality, providing better maintainability and decoupling the infrastructure or technology used to access databases from the domain model layer.
Repository can be viewed as a special kind of Façade (structural) but also as a special kind of Factory (creational). Also, as the Repository often expose collection-like interface, then it might be a special application of Iterator (behavioral).
The repository and unit of work patterns are intended to create an abstraction layer between the data access layer and the business logic layer of an application.
See the answers to Repository pattern tutorial in C#.
I recommend start by Fowler's definition
This concrete implementation could help you as well : )
Ayende's Rhino.Commons has a decent implementation.
I also benefitted from reading "Domain-Driven Design" by Eric Evans, which gives a good foundation of understanding the motivations behind Repository.
Have a look at following Article.
Using the Repository Software Design Pattern
If you go through the whole series above, will be more help full
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With