How to get ID in create when applying CQRS?

CQRS is all about fire-and-forget, and since GUIDs are very reliable (low risk of collision) there is no problem sending in a GUID that you generate your self.

The steps would basically be:

  1. Create your command
  2. Generate and assign your identity (GUID) to it
  3. Fire the command
  4. Return the identity earlier generated

Read more about GUIDs on Wikipedia

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)