public void AddUser(UserId userId, string userName) { ApplyChange(new NewUserAdded(Id, userId, userName)); }
public void ChangeUserName(UserId userId, string newUserName) { ApplyChange(new UserNameChanged(userId, newUserName)); }
private void When(NewUserAdded @event) { Id = new UserId(@event.UserId); UserName = @event.UserName; }