<PackageReference Include="System.Data.SqlClient" Version="4.7.0-rc1.19456.4" />

SqlConnection

public sealed class SqlConnection : DbConnection
Represents a connection to a SQL Server database. This class cannot be inherited.
using System.Collections; using System.Data.Common; using System.Threading; using System.Threading.Tasks; namespace System.Data.SqlClient { public sealed class SqlConnection : DbConnection { 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 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); } 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 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 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); } } }