public void When(UserDeactivated e) { _store.UpdateOrThrow(e.AggregateId, (view) => { view.DeactivatedAt = e.DeactivatedAt; view.Lifetime = view.CreatedAt.Subtract(e.DeactivatedAt).Duration(); }); }
public void When(UserDeactivated e) { _store.TryDelete(e.AggregateId); }
public void Handle(UserDeactivated message) { _service.UpdateMember(message.UserId); }