CQRS

CQRS is a principle in which application commands such as create, update, and delete are segregated by read operations. It works on the event-based model and when any create, update, or delete action is taken on the API, the event handler is invoked and stores that information into its own corresponding data store. We can implement CQRS in the previous vendor registration example, which will facilitate querying the vendor and their orders from a single service. When any command (create, update, delete) operation is performed on the vendor or order service, it will invoke the handler that invokes the query service to save the updated data into its store.

We can keep the data in a flat schema or used NoSQL database to hold all the information ...

Get C# 7 and .NET: Designing Modern Cross-platform Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.