mikelus
mikelus

Reputation: 1039

Using an ORM for domain modifications. Using SQL Views for all read operations. Is this a form of CQRS?

Folks, I am working on a model where users can choose defaults or enter custom values, the results form a number of population-based projections.

I am drawn to using a CQRS-like approach to separate reporting and domain-affecting code.

I intend to use basic SQL views with ADO.NET in one service for reports, and Entity Framework in another service for persisting modifications.

I don't think that event sourcing is required here. Reporting will be done against the domain database.

Is the above an example of CQRS?

Upvotes: 0

Views: 424

Answers (2)

Roy Dictus
Roy Dictus

Reputation: 33139

It's a basic form, yes. After all, reading and writing are separated, and the responsibilities for each are handled by different services. Moreover, your read service doesn't touch your domain layer, it goes straight from the service layer to the ORM. That is definitely the basis of CQRS.

Event Sourcing is actually not a part of CQRS. The two practices are often combined, though.

Upvotes: 5

Mohamed Abed
Mohamed Abed

Reputation: 5113

It is not fully CQRS but it is a good practices from CQRS to bring into your DDD solution, i blogged exactly about this topic with example here

You take the concept of separating read from write model to make ur domain more solid, but without the complexity of separating database and event storage.

Upvotes: 1

Related Questions