public void Handle(UserCreated @event) { State.Username = @event.Username; State.LastModificationDate = @event.Timestamp; }
public UserAggregate(UserId userId, string username, DateTimeOffset timestamp) { var evnt = new UserCreated(userId, username, timestamp); Apply(evnt); }
public void When(UserCreated @event) { this.Id = @event.Id; this.Username = @event.Username; this.Timestamp = @event.Timestamp; }