public Task <Unit> Handle(DeleteSomeDataCommand request, CancellationToken cancellationToken) { try { using (var context = _dbContext) { var aggregate = _someDataWriteRepository.Get(request.Id, context); _someDataWriteRepository.Delete(aggregate, context); context.SaveChanges(); } _eventBus.Publish(new SomeDataDeletedEvent(request.Id)); return(Unit.Task); } catch (Exception e) { Console.WriteLine(e); throw; } }