Relative Content

Tag Archive for repository

Is it ok to have special domain factory – or something similar – directly in DAL?

In DDD application, I know that Domain Factory should be the single point of Domain object creation (input from the UI, the results of queries from persistence) – but I’m facing a problem that for very complex queries, we use stored procedures with multiple data sets – so data are translated to structures (classes) highly dependent on persistence implementation, e.g.

How do you apply Single Responsibility principle to a repository

I am trying to apply “SOLID” whenever I can and try to use common sense and avoid a pattern when I see that a pattern is creating more problems than it’s trying to solve. I don’t want to apply a pattern and make life difficult for somebody else using my code just for the sake “I write patterns” if you see what I mean.

TDD with repository pattern

In my new project, I decided to try with TDD. And in very beginning I encountered a problem. First thing that I want to do in my application is to give ability to read data from data source. For this purpose, I want to use repository pattern.
And now:

TDD with repository pattern

In my new project, I decided to try with TDD. And in very beginning I encountered a problem. First thing that I want to do in my application is to give ability to read data from data source. For this purpose, I want to use repository pattern.
And now: