public void Handle(UserAssociatedWithIdentity @event) { using (var session = _documentStore.OpenSession()) { var doc = session.Load <UserDocument>(RavenDb.GetId <UserDocument>(@event.AggregateId)); doc.AccountAssociations.Add(new AccountAssociationDocument { Identity = @event.Identity, Network = @event.Network }); session.SaveChanges(); _bus.PublishNotification(doc); } }
private void Apply(UserAssociatedWithIdentity associatedWithIdentity) { }