public async Task Delete(int id) { var entity = await GetById(id); if (entity == null) { throw new ArgumentNullException(nameof(entity)); } await _repository.Delete(entity); }
public void Execute(AccountClosedEvent theEvent) { _reportingRepository.Delete <AccountReport>(new { Id = theEvent.AggregateId }); _reportingRepository.Delete <AccountDetailsReport>(new { Id = theEvent.AggregateId }); }
/// <summary> /// Delete Reporting Data /// </summary> /// <param name="evt"></param> public void Handle(PersonDeletedEvent evt) { _reportingRepository.Delete <Person>(evt.Id); }