Skip to content

Instantly share code, notes, and snippets.

@nbarnwell
Created April 10, 2023 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nbarnwell/ff2b76f04ea960d6133badb77826e588 to your computer and use it in GitHub Desktop.
Save nbarnwell/ff2b76f04ea960d6133badb77826e588 to your computer and use it in GitHub Desktop.
// This is not CQRS:
public interface IRobotService
{
void Walk();
void Sleep();
int GetBatteryLevel();
void GoOutAndComeBackInAgain();
}
// This is CQRS. You can "level-up" from here, but this is all it is, really
public IRobotCommands
{
void Walk();
void Sleep();
void GoOutAndComeBackInAgain();
}
public IRobotQueries
{
int GetBatteryLevel();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment