title: Granular domain events
body: <p>Initially we were using Domain events to handle communications with external systems. For instance, every time a user was updating his phone number OR his name we raise a PhoneNumberUpdated AND a NameUpdated event. These are then caught by handlers processed and sent to other systems.</p>
  
  <pre><code>    public void SetName(Name name)
      {
          if (Name == name) return;
          (...)
          RaiseEvent(new NameUpdated(Id, name));
      }
  
      public void SetPhoneNumber(PhoneNumber number, PhoneNumberType type)
      {
          RaiseEvent(new PhoneNumberUpdated());
      }
  </code></pre>
  
  <p>It works great as long as we do not need to "aggregate" events. For example, we got a new requirement asking us to to send one single email whenever a user updates his name and/or his phone number. With the current structure, our handlers would be notified multiples times (one time for each event raised) and this would result in multiple emails sent.</p>
  
  <p>Making our events more generic don't seem to be a good solution. But then how would we aggregate several events raised within one transaction?</p>
  
  <p>Thx
  Seb</p>