C# 中的存储库模式
我正在尝试找出 .NET 的存储库模式。我想我对它已经有了相当不错的理解,但我仍然觉得使用起来不太舒服。
我已经用谷歌搜索了这个主题,但发现了一些高级主题以及存储库模式。我正在寻找的是这个概念的基本知识,然后我可以在此基础上进行构建。话虽如此,我可以获得一些有关存储库模式的好文章的推荐吗?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
请参阅 C# 中的存储库模式教程。
See the answers to Repository pattern tutorial in C#.
我建议从 Fowler 的定义开始
具体实施也可以帮助你:)
I recommend start by Fowler's definition
This concrete implementation could help you as well : )
看看下面的文章。
使用存储库软件设计
模式
如果您完成上述整个系列,将会更有帮助
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
Ayende 的 Rhino.Commons 有一个不错的实现。
我还受益于阅读 Eric Evans 的《领域驱动设计》,它为理解存储库背后的动机奠定了良好的基础。
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.
我的处境与您完全相同。我发现这篇 Remondo.net 博客文章特别有用。它逐步介绍了基本存储库的实现:
C# 中的存储库模式示例
I'm in exactly the same position you were in. I found this Remondo.net blog post particularly useful. It walks through the implementation of a basic repository:
The Repository Pattern Example in C#