...

/

The Customers Module

The Customers Module

Learn to define a command, create a command handler, and integrate it into the customer module’s composition root.

We have only one command to define for the Customers module—a new protocol buffer message for AuthorizeCustomer:

message AuthorizeCustomer {
string id = 1;
}
A new protocol buffer message for AuthorizeCustomer

Just like the events we have already defined, we will create a constant called AuthorizeCustomerCommand that will hold the unique name for the command that will be used in its Key() method so that we can register the type in the registry. Alongside the string constant for the command name, we also need to add a ...