예제 #1
0
파일: User.cs 프로젝트: mastoj/NBlog
 private void UserCreated(UserCreatedEvent userCreatedEvent)
 {
     AggregateId = userCreatedEvent.AggregateId;
     _authenticationId = userCreatedEvent.authenticationId;
     _email = userCreatedEvent.Email;
     _name = userCreatedEvent.Name;
 }
예제 #2
0
파일: UserView.cs 프로젝트: mastoj/NBlog
 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();
 }
예제 #3
0
파일: User.cs 프로젝트: mastoj/NBlog
 private User(string authenticationId, string name, string email, Guid aggregateId)
     : this()
 {
     var userCreatedEvent = new UserCreatedEvent(authenticationId, name, email, aggregateId);
     Apply(userCreatedEvent);
 }