title: Event Sourcing and Read Model generation
body: <p>Assuming Stack Overflow domain problem and the following definition of events:</p>
  
  <pre><code>UserRegistered(UserId, Name, Email)
  UserNameChanged(UserId, Name)
  QuestionAsked(UserId, QuestionId, Title, Question)
  </code></pre>
  
  <p>Assuming the following state of event store (in the order of appearance):</p>
  
  <pre><code>1) UserRegistered(1, "John", "john@gmail.com")
  2) UserNameChanged(1, "SuperJohn")
  3) UserNameChanged(1, "John007")
  4) QuestionAsked(1, 1, "Help!", "Please!")
  </code></pre>
  
  <p>Assuming the following denormalized read model for questions listing (for the first page of SO):</p>
  
  <pre><code>QuestionItem(UserId, QuestionId, QuestionTitle, Question, UserName)
  </code></pre>
  
  <p>And the following event handler (which builds denormalized read model):</p>
  
  <pre><code>public class QuestionEventsHandler
  {
      public void Handle(QuestionAsked question)
      {
          var item = new QuestionItem(
              question.UserId, 
              question.QuestionId, 
              question.Title, 
              question.Question, 
              ??? /* how should i get name of the user? */);
          ...
      }
  }
  </code></pre>
  
  <p>My question is <strong>how can i find the name of the user</strong> who asked a question? Or more common: how should i handle events if my denormalized read model requires additional data which is not exists in the particular event?</p>
  
  <p>I've examined existing samples of CQRS including <a href="http://github.com/gregoryyoung/m-r" rel="noreferrer">SimpleSQRS</a> of Greg Young and <a href="http://github.com/MarkNijhof/Fohjin" rel="noreferrer">Fohjin</a> sample of Mark Nijhof. But it seems to me that they are operate only with data that is included in events.</p>