Esempio n. 1
0
        } //CheckCpfCnpjExistUpdate

        #endregion

        #region Remove...

        public Cliente Remove(Cliente cliente)
        {
            cliente = CheckIfReadyToRemove(cliente);
            if (cliente.ListaErros.Count != 0)
            {
                return(cliente);
            }

            _repositoryCliente.Remove(cliente);
            return(cliente);
        } //Remove
Esempio n. 2
0
        public void ExcluirCliente(int id)
        {
            Cliente c = _clienteRepository.GetById(id);

            if (c == null)
            {
                throw new ArgumentException("Cliente não encontrado");
            }

            _clienteRepository.Remove(c);
        }