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; } }
public AssociationMember GetMember(string userId) { return(AssociationMembers.SingleOrDefault(m => m.Id == userId)); }