private bool CustomerAddressExists(string zipCode, string number, Guid idClientAddress, Guid idAddress, bool isCreation) { string messageError = "O endereço já está cadastrado para este usuário (zipCode e number já existem)"; Guid idAddressDao = AddressDao.CustomerAddressExists(zipCode, number, idClientAddress); if (idAddressDao == Guid.Empty) { return(false); } if (isCreation) { httpStatus = HttpStatusCode.InternalServerError; replyMessage = messageError; return(true); } if (!isCreation && idAddressDao.ToString().ToLower() != idAddress.ToString().ToLower()) { httpStatus = HttpStatusCode.InternalServerError; replyMessage = messageError; return(true); } return(false); }