Command Query Responsibility Segregation (CQRS)
Command Query Responsibility Segregation (CQRS) is the idea that each method should either be one that performs an action (command) or requests data (query), but not both. In the context of our sample app, we would not have the database access code directly within the Controller for an endpoint, but rather create a Component (Database Service) that has a method such as getAllUsers()
that will return all the users that the Controllers Service can call, thus separating the question and the answer into different Components.