<PackageReference Include="System.Data.SqlClient" Version="4.7.0-preview9.19421.4" />

SqlConnection

public sealed class SqlConnection : DbConnection, ICloneable
Represents a connection to a SQL Server database. This class cannot be inherited.
using System.Collections; using System.Data.Common; using System.Security; using System.Threading; using System.Threading.Tasks; namespace System.Data.SqlClient { public sealed class SqlConnection : DbConnection, ICloneable { public string AccessToken { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } set { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public Guid ClientConnectionId { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public override string ConnectionString { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } set { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public override int ConnectionTimeout { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public SqlCredential Credential { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } set { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public override string Database { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public override string DataSource { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public bool FireInfoMessageEventOnUserErrors { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } set { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public int PacketSize { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public override string ServerVersion { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public override ConnectionState State { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public bool StatisticsEnabled { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } set { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public string WorkstationId { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } public event SqlInfoMessageEventHandler InfoMessage { add { } remove { } } public SqlConnection() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public SqlConnection(string connectionString) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public SqlConnection(string connectionString, SqlCredential credential) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public new SqlTransaction BeginTransaction() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public new SqlTransaction BeginTransaction(IsolationLevel iso) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public SqlTransaction BeginTransaction(IsolationLevel iso, string transactionName) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public SqlTransaction BeginTransaction(string transactionName) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public override void ChangeDatabase(string database) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public static void ChangePassword(string connectionString, SqlCredential credential, SecureString newPassword) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public static void ChangePassword(string connectionString, string newPassword) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public static void ClearAllPools() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public static void ClearPool(SqlConnection connection) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public override void Close() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public new SqlCommand CreateCommand() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } protected override DbCommand CreateDbCommand() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } protected override void Dispose(bool disposing) { } public override DataTable GetSchema() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public override DataTable GetSchema(string collectionName) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public override DataTable GetSchema(string collectionName, string[] restrictionValues) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public override void Open() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public override Task OpenAsync(CancellationToken cancellationToken) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public void ResetStatistics() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } public IDictionary RetrieveStatistics() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } object ICloneable.Clone() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_DataSqlClient); } } }