Exemplo n.º 1
0
        public CircleDeleteOutputData Handle(CircleDeleteInputData inputData)
        {
            using var transaction = new TransactionScope();

            var id     = new CircleId(inputData.Id);
            var circle = circleRepository.Find(id);

            if (circle == null)
            {
                return(new CircleDeleteOutputData());
            }

            circleRepository.Delete(circle);

            transaction.Complete();

            return(new CircleDeleteOutputData());
        }
Exemplo n.º 2
0
        public void Delete(string id)
        {
            var command = new CircleDeleteInputData(id);

            bus.Handle(command);
        }