Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if Cliente instances are equal
        /// </summary>
        /// <param name="other">Instance of Cliente to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Cliente other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Nome == other.Nome ||
                     Nome != null &&
                     Nome.Equals(other.Nome)
                 ) &&
                 (
                     Idade == other.Idade ||
                     Idade != null &&
                     Idade.Equals(other.Idade)
                 ) &&
                 (
                     CadastradoEm == other.CadastradoEm ||
                     CadastradoEm != null &&
                     CadastradoEm.Equals(other.CadastradoEm)
                 ) &&
                 (
                     Cpf == other.Cpf ||
                     Cpf != null &&
                     Cpf.Equals(other.Cpf)
                 ) &&
                 (
                     Endereco == other.Endereco ||
                     Endereco != null &&
                     Endereco.Equals(other.Endereco)
                 ));
        }