public void Handle(DeleteAnnotationCommand message)
        {
            if (!AnnotationExisting(message.AggregateId, message.MessageType))
            {
                return;
            }

            _annotationRepository.Remove(message.Id);

            if (Commit())
            {
                _bus.RaiseEvent(new AnnotationDeletedEvent(message.AggregateId));
            }
        }
        public Task <Unit> Handle(DeleteAnnotationCommand request, CancellationToken cancellationToken)
        {
            if (!AnnotationExisting(request.AggregateId, request.MessageType))
            {
                return(Unit.Task);
            }

            _annotationRepository.Remove(request.Id);

            if (Commit())
            {
                _mediator.RaiseEvent(new AnnotationDeletedEvent(request.AggregateId));
            }
            return(Unit.Task);
        }