public void Publish(DomainEvent @event, IPublishEndpoint publisher) { ConcertCreatedDomainEvent createdDomainEvent = (ConcertCreatedDomainEvent)@event; ConcertCreatedEvent concertCreatedEvent = new ConcertCreatedEvent(createdDomainEvent.NumberOfTickets, createdDomainEvent.Place, createdDomainEvent.Date, createdDomainEvent.Title, createdDomainEvent.ConcertId); publisher.Publish(concertCreatedEvent); }
public async Task Publish(ConcertCreatedEvent @event) { await _bus.Publish(@event); }