private void UserCreated(UserCreatedEvent userCreatedEvent) { AggregateId = userCreatedEvent.AggregateId; _authenticationId = userCreatedEvent.authenticationId; _email = userCreatedEvent.Email; _name = userCreatedEvent.Name; }
public void Handle(UserCreatedEvent userAddedEvent) { var author = new UserViewItem() { AuthenticationId = userAddedEvent.authenticationId, UserName = userAddedEvent.Name, UserEmail = userAddedEvent.Email, UserId = userAddedEvent.AggregateId }; _userViewRepository.Insert(author); _userViewRepository.CommitChanges(); }
private User(string authenticationId, string name, string email, Guid aggregateId) : this() { var userCreatedEvent = new UserCreatedEvent(authenticationId, name, email, aggregateId); Apply(userCreatedEvent); }