nestjs-cqrs-saga icon indicating copy to clipboard operation
nestjs-cqrs-saga copied to clipboard

Do we really need services?

Open vahidvdn opened this issue 3 years ago • 1 comments

I guess in CQRS we don't need the services at all, since services usually are used for having database queries and we are delegating this to the command and query executors, having services doesn't make too much sense. Any idea?

vahidvdn avatar Jan 15 '22 09:01 vahidvdn

Absolutely, what corresponds to a service in an MVC model, corresponds to a Command or a Query in a CQRS model. However, nothing prevents having services for responsibilities that can be called in commands or query.

amehat avatar Jan 23 '22 15:01 amehat