public GetAddressesViewTests() { var associationId = "ass123"; _addressAddedToAssociationEvent = DomainEventHelper.Create <AddressAddedToAssociation>(associationId); _addressRemovedFromAssociationEvent = DomainEventHelper.Create <AddressRemovedFromAssociation>(associationId); _codeAssignedToAddressEvent = DomainEventHelper.Create <CodeAssignedToAddress>(associationId); }
public void Handle(IViewContext context, AddressRemovedFromAssociation domainEvent) { _addresses.RemoveAll(a => a.Id == domainEvent.Id); }
public void Handle(IViewContext context, AddressRemovedFromAssociation domainEvent) { var associationId = domainEvent.GetAggregateRootId(); GetAssociationAddressList(associationId).RemoveAll(a => a.Id == domainEvent.Id); }