tag:blogger.com,1999:blog-4273255328290947077.post1240181107009359885..comments2023-05-17T10:04:02.732-06:00Comments on Being Cellfish: Where does the Repository belong?cellfishhttp://www.blogger.com/profile/12888771675677858223noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-4273255328290947077.post-20367894515867625992015-10-24T16:15:16.802-06:002015-10-24T16:15:16.802-06:00That is an excellent concise way of putting it.That is an excellent concise way of putting it.cellfishhttps://www.blogger.com/profile/12888771675677858223noreply@blogger.comtag:blogger.com,1999:blog-4273255328290947077.post-553386557166161002015-10-23T04:47:49.163-06:002015-10-23T04:47:49.163-06:00Repositories are an implementation detail, their c...Repositories are an implementation detail, their contracts however belong to the domain.Jef Claeshttps://www.blogger.com/profile/17313599911430422160noreply@blogger.comtag:blogger.com,1999:blog-4273255328290947077.post-47698207371480079822015-10-19T13:07:57.472-06:002015-10-19T13:07:57.472-06:00There's a pretty clear definition of what a re...There's a pretty clear definition of what a repository is. It pains me to see code that has a repository for every entity, each dutifully tested with a mock because *everything* has an interface whereby the developer is dogmatically applying code to a contract, without appreciating the why fully. If you want Lots of entities with corresponding repositories just call your data access objects what they are; DataAccessObjects. If you're using an ORM just use the session / UoW. Ed Blackburnhttps://www.blogger.com/profile/17045008823330793876noreply@blogger.comtag:blogger.com,1999:blog-4273255328290947077.post-60215947781906517852015-10-19T09:00:35.252-06:002015-10-19T09:00:35.252-06:00The answer to this depends on what your model look...The answer to this depends on what your model looks like. There's a very detailed discussion in Domain Driven Design (chapter 6 discusses repositories and factories): http://dddcommunity.org/uncategorized/toc/<br /><br />TLDR; They are part of your model.Anonymoushttps://www.blogger.com/profile/04865067152650000136noreply@blogger.comtag:blogger.com,1999:blog-4273255328290947077.post-27963477391716487462015-10-16T12:04:32.292-06:002015-10-16T12:04:32.292-06:00As I state in the last paragraph; the repository d...As I state in the last paragraph; the repository does not know about the storage details but it does need to have access to the generic data access layer.cellfishhttps://www.blogger.com/profile/12888771675677858223noreply@blogger.comtag:blogger.com,1999:blog-4273255328290947077.post-8315069675596997982015-10-16T10:00:09.554-06:002015-10-16T10:00:09.554-06:00Repository works data entities. If you move reposi...Repository works data entities. If you move repositories to domain layer, won't your layer now will know about data entities which they should not know about so that to abstract data layer?Sanjay Singhhttps://www.blogger.com/profile/07028497673958600016noreply@blogger.com