Exemplo n.º 1
0
        public void Handle(IViewContext context, UserAttachedToAddress domainEvent)
        {
            var userProfile = AssociationMembers.SingleOrDefault(m => m.Id == domainEvent.UserId);
            var address     = AssociationAddresses.SingleOrDefault(a => a.Id == domainEvent.AddressId);

            if (userProfile != null && address != null)
            {
                userProfile.Address = address;
            }
        }
Exemplo n.º 2
0
 public AssociationMember GetMember(string userId)
 {
     return(AssociationMembers.SingleOrDefault(m => m.Id == userId));
 }