示例#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);
 }