Aggregate root & Repository dilemma
I am in a big dilemma here.
DDD Model Design and Repository Persistence Performance Considerations
So I have been reading about DDD for some time and trying to figure out the best approach on several issues.
Should I create repositories with special functions like getStaffActive()?
I have seen lots of articles but none really help me. That is because I want to use dapper as a DAL. Should I create repositories with special functions? Like getStaffActive()?
How do you handle objects that need custom behavior, and need to exist as an entity in the database?
For a simple example, assume your application sends out notifications to users when various events happen. So in the database I might have the following tables:
Unit of work/repository pattern with dependency injection advice
I’m developing a series of repository classes and a UnitOfWork class (plus its IUnitOfWork interface of course). I’m using Castle Windsor, which injects dependencies via constructors.
CQRS with Repository pattern and Inversion of Control (with DI)
I assigned a POC project to someone where I asked to implement both Command Query Responsibility Segregation, Inversion of Control (with Dependency Injection) and Repository pattern. “Someone” gave me a POC solution project but I am not sure whether this is the way it is done. I will brief here about the POC project
Is it bad practise to create instances from a SQL-query?
I’m researching ways to create a OO-model/repository-layer using PHP’s PDO. My idea was to create model classes that represent a domain object and a repository class for each model that has the responsibility of:
Should Repositories return IQueryable?
I have been seeing a lot of projects that have repositories that return instances of IQueryable
. This allows additional filters and sorting can be performed on the IQueryable
by other code, which translates to different SQL being generated. I am curious where this pattern came from and whether it is a good idea.
Should Repositories return IQueryable?
I have been seeing a lot of projects that have repositories that return instances of IQueryable
. This allows additional filters and sorting can be performed on the IQueryable
by other code, which translates to different SQL being generated. I am curious where this pattern came from and whether it is a good idea.
Generic repository unit testing best practice?
How can I unit test my generic repository?