Created
January 13, 2018 19:07
-
-
Save horsdal/985e8b0bcb17772a9cd4c991156cf9e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UsernameChangedEvent : Event<UserAggregate> | |
{ | |
public string Username { get; } | |
public Guid Id { get; } | |
public string OldUsername { get; } | |
public UsernameChangedEvent(string username, Guid id, string oldUsername) | |
{ | |
this.Username = username; | |
this.Id = id; | |
this.OldUsername = oldUsername; | |
} | |
public void When(UserAggregate aggregate) | |
{ | |
aggregate.Username = this.Username; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment