private static bool ShouldTrustServerCertificate(DbConnectionStringBuilder builder) { var encrypt = builder.EncryptIsSet(); var isAzureAuth = builder.IsAzureAuth(); var server = builder.GetServer(); var trustServerCertificateAlreadySpecified = builder.IsTrustServerCertificateAlreadySpecified(); return(ShouldTrustServerCertificate(encrypt, isAzureAuth, trustServerCertificateAlreadySpecified, server)); }