Guest User

Untitled

a guest
Oct 24th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public class UserAggregate : Aggregate
  2. {
  3. private string username = String.Empty;
  4. private string email = String.Empty;
  5.  
  6. public void Create(CreateUserCommand command) { ... }
  7.  
  8. protected void When(UserCreatedEvent e)
  9. {
  10. this.username = e.Username;
  11. this.email = e.EmailAddress;
  12. this.Id = e.Id;
  13. }
  14. }
Add Comment
Please, Sign In to add comment