Skip to content

What operations should be included to Repository? #80

@antklim

Description

@antklim

Hi,

Thank you for the great project example and book. It really helps with understanding DDD and Clean Architecture principles.

I have a question about what should and should not be a part of Repository.

For example, in trainings/domain/training repository there are only 3 methods declared. The repository injected to commands - for example, approve training reschedule handler.
However, queries define their own read model. For example, all trainings query. Queries do not depend on domain repository.

Meanwhile, the repository implementation implements both - domain repository and read models defined in queries.

I'm a bit confused why AllTrainings and FindTrainingsForUser are not part of domain repository? Is it related to command and query models separation?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions