public async Task <TAggregate> Raise <TAggregate>(ISuppressionEvent <TAggregate> @event) where TAggregate : class, IAggregate { var eventInformation = this.BuildEventInformation(@event); await this.EventInformationRepository.Create(eventInformation); var aggregate = await this._dependencyResolver.Get <IRepository <TAggregate> >().GetById(@event.AggregateId); await this.LaunchEventHandlers(aggregate, @event); return(aggregate); }
public async Task Handle(TAggregate aggregate, ISuppressionEvent <TAggregate> @event) { await this.Repository.Delete(aggregate); }