예제 #1
0
        public ICommandResult Handler(DeleteListaCommand command)
        {
            command.Validate();
            if (command.Invalid)
            {
                return(new GenericCommandResult(false, "Alguma coisa deu errado", command.Notifications));
            }

            var lista = _listaRepository.GetById(command.IdList);

            _listaRepository.DeleteLista(lista);

            return(new GenericCommandResult(true, "sucesso", ""));
        }