mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-21 09:35:39 -05:00
Update Microsoft.Data.SqlClient to v5.0.1 (#1708)
This commit is contained in:
@@ -35,6 +35,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common
|
||||
{
|
||||
DataSource = connectParams.Connection.ServerName,
|
||||
InitialCatalog = connectParams.Connection.DatabaseName,
|
||||
TrustServerCertificate = true
|
||||
};
|
||||
|
||||
if (connectParams.Connection.AuthenticationType == "Integrated")
|
||||
@@ -45,6 +46,23 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common
|
||||
{
|
||||
builder.UserID = connectParams.Connection.UserName;
|
||||
builder.Password = connectParams.Connection.Password;
|
||||
builder.PersistSecurityInfo = true;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(connectParams.Connection.Encrypt))
|
||||
{
|
||||
builder.Encrypt = connectParams.Connection.Encrypt switch
|
||||
{
|
||||
"optional" or "false" or "no" => SqlConnectionEncryptOption.Optional,
|
||||
"mandatory" or "true" or "yes" => SqlConnectionEncryptOption.Mandatory,
|
||||
"strict" => SqlConnectionEncryptOption.Strict,
|
||||
_ => SqlConnectionEncryptOption.Optional
|
||||
};
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(connectParams.Connection.HostNameInCertificate))
|
||||
{
|
||||
builder.HostNameInCertificate = connectParams.Connection.HostNameInCertificate;
|
||||
}
|
||||
|
||||
return builder.ToString();
|
||||
|
||||
Reference in New Issue
Block a user