diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-10-07 13:35:08 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-10-07 13:35:08 +0300 |
| commit | bd514806e6c261d49a78938daad1f1185f167441 (patch) | |
| tree | 42e4d81d01a45641a1c0aab360992754343d4353 /Software/Visual_Studio/Tango.Core/DataSource.cs | |
| parent | a2fcd642758c9506188160856a0f9cc0dc48be38 (diff) | |
| download | Tango-bd514806e6c261d49a78938daad1f1185f167441.tar.gz Tango-bd514806e6c261d49a78938daad1f1185f167441.zip | |
BACK TO .NET 4.6 !!
Diffstat (limited to 'Software/Visual_Studio/Tango.Core/DataSource.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Core/DataSource.cs | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/Software/Visual_Studio/Tango.Core/DataSource.cs b/Software/Visual_Studio/Tango.Core/DataSource.cs index bc4274276..511a82267 100644 --- a/Software/Visual_Studio/Tango.Core/DataSource.cs +++ b/Software/Visual_Studio/Tango.Core/DataSource.cs @@ -15,7 +15,7 @@ namespace Tango.Core /// </summary> public class DataSource { - private static bool _has_provider; + //private static bool _has_provider; /// <summary> /// Gets or sets the type of source. @@ -102,28 +102,28 @@ namespace Tango.Core if (IntegratedSecurity) { + throw new NotSupportedException("Azure integrated security is not supported."); + //if (!_has_provider) + //{ + // var provider = new ActiveDirectoryAuthProvider(); + // SqlAuthenticationProvider.SetProvider(SqlAuthenticationMethod.ActiveDirectoryInteractive, provider); + // _has_provider = true; + //} - if (!_has_provider) - { - var provider = new ActiveDirectoryAuthProvider(); - SqlAuthenticationProvider.SetProvider(SqlAuthenticationMethod.ActiveDirectoryInteractive, provider); - _has_provider = true; - } + //SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); - SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); + //builder.DataSource = Address; + //builder.InitialCatalog = Catalog; + //builder.UserID = UserName; + //builder.TrustServerCertificate = true; + //builder.ConnectTimeout = 15; + //builder.Pooling = false; - builder.DataSource = Address; - builder.InitialCatalog = Catalog; - builder.UserID = UserName; - builder.TrustServerCertificate = true; - builder.ConnectTimeout = 15; - builder.Pooling = false; + //builder.Authentication = SqlAuthenticationMethod.ActiveDirectoryInteractive; - builder.Authentication = SqlAuthenticationMethod.ActiveDirectoryInteractive; + //SqlConnection sqlConnection = new SqlConnection(builder.ConnectionString); - SqlConnection sqlConnection = new SqlConnection(builder.ConnectionString); - - return sqlConnection; + //return sqlConnection; } else { |
