Example #1
0
        public Result RemoverConta(RemoverContaCommand command)
        {
            try
            {
                var result = command.Validate();
                if (result.IsFailure)
                {
                    return(result);
                }

                _repository.RemoverConta(result.Value);

                return(Result.Ok());
            }
            catch (Exception ex)
            {
                return(Result.Fail("Falha ao remover conta"));
            }
        }