3 types derived from DbConnection
System.Data.Odbc (2)
System\Data\Odbc\OdbcConnection.cs (1)
15
public sealed partial class OdbcConnection :
DbConnection
, ICloneable
System\Data\Odbc\OdbcConnectionHelper.cs (1)
11
public sealed partial class OdbcConnection :
DbConnection
System.Data.OleDb (1)
artifacts\obj\System.Data.OleDb\Debug\net10.0\System.Data.OleDb.notsupported.cs (1)
84
public sealed partial class OleDbConnection : System.Data.Common.
DbConnection
, System.Data.IDbConnection, System.ICloneable, System.IDisposable
113 references to DbConnection
Aspire.MySqlConnector.Tests (2)
ConformanceTests.cs (2)
112
DbConnection
? dbConnection = Resolve<
DbConnection
>();
Aspire.Npgsql.Tests (2)
ConformanceTests.cs (2)
114
DbConnection
? dbConnection = Resolve<
DbConnection
>();
HealthChecksSample (3)
DbConnectionHealthCheck.cs (2)
31
protected abstract
DbConnection
CreateConnection(string connectionString);
35
using (
var
connection = CreateConnection(ConnectionString))
SqlConnectionHealthCheck.cs (1)
23
protected override
DbConnection
CreateConnection(string connectionString)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (8)
DbUtil.cs (2)
16
DbConnection
connection,
36
public static TContext Create<TContext>(
DbConnection
connection, IServiceCollection services = null) where TContext : DbContext
SqlStoreOnlyUsersTestBase.cs (1)
80
var
sqlConn = dbContext.Database.GetDbConnection();
SqlStoreTestBase.cs (1)
130
var
sqlConn = dbContext.Database.GetDbConnection();
UserStoreEncryptPersonalDataTest.cs (3)
121
private bool FindInk(
DbConnection
conn, string column, string id)
140
private bool FindAuthenticatorKeyInk(
DbConnection
conn, string id)
143
private bool FindTokenInk(
DbConnection
conn, string id, string loginProvider, string tokenName)
Utilities\ScratchDatabaseFixture.cs (1)
28
public
DbConnection
Connection => _connection;
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Infrastructure\FunctionalTestsServiceCollectionExtensions.cs (1)
20
public static IServiceCollection SetupTestDatabase<TContext>(this IServiceCollection services,
DbConnection
connection) where TContext : DbContext =>
Microsoft.Data.Analysis (3)
DataFrame.IO.cs (1)
237
var
connection = dataAdapter.SelectCommand.Connection;
Extensions.cs (2)
15
public static DbDataAdapter CreateDataAdapter(this DbProviderFactory factory,
DbConnection
connection, string tableName)
24
public static bool TryOpen(this
DbConnection
connection)
Microsoft.Data.Analysis.Tests (2)
DataFrame.IOTests.cs (2)
1256
static (SQLiteProviderFactory factory,
DbConnection
connection) InitSQLiteDb()
1263
var
connection = factory.CreateConnection();
Microsoft.ML.Data (5)
DataLoadSave\Database\DatabaseLoaderCursor.cs (2)
25
private
DbConnection
_connection;
56
public
DbConnection
Connection
DataLoadSave\Database\DatabaseSource.cs (3)
16
/// <param name="providerFactory">The factory used to create the <see cref="
DbConnection
"/>..</param>
25
/// <param name="providerFactory">The factory used to create the <see cref="
DbConnection
"/>..</param>
51
/// <summary>Gets the factory used to create the <see cref="
DbConnection
"/>.</summary>
netstandard (1)
netstandard.cs (1)
456
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.
DbConnection
))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
28
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.
DbConnection
))]
System.Data.Common (31)
System\Data\Common\DbBatch.cs (2)
17
public
DbConnection
? Connection
23
protected abstract
DbConnection
? DbConnection { get; set; }
System\Data\Common\DbCommand.cs (3)
31
public
DbConnection
? Connection
40
set { DbConnection = (
DbConnection
?)value; }
43
protected abstract
DbConnection
? DbConnection { get; set; }
System\Data\Common\DBCommandBuilder.cs (1)
572
DbConnection
? connection = srcCommand.Connection;
System\Data\Common\DbConnection.cs (3)
152
/// Returns schema information for the data source of this <see cref="
DbConnection
" />.
165
/// Returns schema information for the data source of this <see cref="
DbConnection
" /> using the specified
183
/// Returns schema information for the data source of this <see cref="
DbConnection
" /> using the specified
System\Data\Common\DbDataSource.cs (16)
15
protected abstract
DbConnection
CreateDbConnection();
17
protected virtual
DbConnection
OpenDbConnection()
19
var
connection = CreateDbConnection();
33
protected virtual async ValueTask<
DbConnection
> OpenDbConnectionAsync(CancellationToken cancellationToken = default)
35
var
connection = CreateDbConnection();
60
public
DbConnection
CreateConnection()
63
public
DbConnection
OpenConnection()
66
public ValueTask<
DbConnection
> OpenConnectionAsync(CancellationToken cancellationToken = default)
99
private readonly
DbConnection
_connection;
314
var
connection = _wrappedCommand.Connection;
323
var
connection = _wrappedCommand.Connection;
342
protected override
DbConnection
? DbConnection
358
private readonly
DbConnection
_connection;
544
var
connection = _wrappedBatch.Connection;
552
var
connection = _wrappedBatch.Connection;
571
protected override
DbConnection
? DbConnection
System\Data\Common\DbProviderFactories.cs (1)
76
public static DbProviderFactory? GetFactory(
DbConnection
connection)
System\Data\Common\DbProviderFactory.cs (1)
60
public virtual
DbConnection
? CreateConnection() => null;
System\Data\Common\DbTransaction.cs (2)
13
public
DbConnection
? Connection => DbConnection;
17
protected abstract
DbConnection
? DbConnection { get; }
System\Data\Common\DefaultDataSource.cs (2)
19
protected override
DbConnection
CreateDbConnection()
21
var
connection = _dbProviderFactory.CreateConnection();
System.Data.Odbc (51)
Common\System\Data\ProviderBase\DbConnectionFactory.cs (1)
13
internal bool TryGetConnection(
DbConnection
owningConnection, TaskCompletionSource<DbConnectionInternal>? retry, DbConnectionOptions? userOptions, DbConnectionInternal? oldConnection, out DbConnectionInternal? connection)
Common\System\Data\ProviderBase\DbConnectionInternal.cs (1)
30
internal virtual void CloseConnection(
DbConnection
owningObject, DbConnectionFactory connectionFactory)
Common\System\Data\ProviderBase\DbConnectionPool.cs (8)
25
public PendingGetConnection(long dueTime,
DbConnection
owner, TaskCompletionSource<DbConnectionInternal> completion)
32
public
DbConnection
Owner { get; }
384
private DbConnectionInternal CreateObject(
DbConnection
? owningObject, DbConnectionOptions? userOptions, DbConnectionInternal? oldConnection)
664
internal bool TryGetConnection(
DbConnection
owningObject, TaskCompletionSource<DbConnectionInternal>? retry, DbConnectionOptions? userOptions, out DbConnectionInternal? connection)
716
private bool TryGetConnection(
DbConnection
owningObject, uint waitForMultipleObjectsTimeout, bool allowCreate, bool onlyOneCheckConnection, DbConnectionOptions? userOptions, out DbConnectionInternal? connection)
854
private void PrepareConnection(
DbConnection
owningObject, DbConnectionInternal obj)
880
internal DbConnectionInternal? ReplaceConnection(
DbConnection
owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
1138
private DbConnectionInternal? UserCreateRequest(
DbConnection
owningObject, DbConnectionOptions? userOptions, DbConnectionInternal? oldConnection = null)
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionClosed.cs (8)
23
internal override void CloseConnection(
DbConnection
owningObject, DbConnectionFactory connectionFactory)
30
protected internal override DataTable GetSchema(DbConnectionFactory factory, DbConnectionPoolGroup poolGroup,
DbConnection
outerConnection, string collectionName, string?[]? restrictions)
35
internal override bool TryOpenConnection(
DbConnection
outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource<DbConnectionInternal>? retry, DbConnectionOptions? userOptions)
45
internal override bool TryOpenConnection(
DbConnection
outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource<DbConnectionInternal>? retry, DbConnectionOptions? userOptions)
79
internal override void CloseConnection(
DbConnection
owningObject, DbConnectionFactory connectionFactory)
84
internal override bool TryReplaceConnection(
DbConnection
outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource<DbConnectionInternal>? retry, DbConnectionOptions? userOptions)
87
internal override bool TryOpenConnection(
DbConnection
outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource<DbConnectionInternal>? retry, DbConnectionOptions? userOptions)
134
internal override bool TryReplaceConnection(
DbConnection
outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource<DbConnectionInternal>? retry, DbConnectionOptions? userOptions)
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionFactory.cs (13)
54
public void ClearPool(
DbConnection
connection)
81
internal DbConnectionInternal? CreateNonPooledConnection(
DbConnection
owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions? userOptions)
95
internal DbConnectionInternal? CreatePooledConnection(DbConnectionPool pool,
DbConnection
? owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions? userOptions)
138
private DbConnectionPool? GetConnectionPool(
DbConnection
owningObject, DbConnectionPoolGroup connectionPoolGroup)
360
protected virtual DbConnectionInternal? CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, object poolGroupProviderInfo, DbConnectionPool? pool,
DbConnection
? owningConnection, DbConnectionOptions? userOptions)
385
protected abstract DbConnectionInternal CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, object poolGroupProviderInfo, DbConnectionPool? pool,
DbConnection
? owningConnection);
391
internal abstract DbConnectionPoolGroup? GetConnectionPoolGroup(
DbConnection
connection);
393
internal abstract DbConnectionInternal? GetInnerConnection(
DbConnection
connection);
395
internal abstract void PermissionDemand(
DbConnection
outerConnection);
397
internal abstract void SetConnectionPoolGroup(
DbConnection
outerConnection, DbConnectionPoolGroup poolGroup);
399
internal abstract void SetInnerConnectionEvent(
DbConnection
owningObject, DbConnectionInternal to);
401
internal abstract bool SetInnerConnectionFrom(
DbConnection
owningObject, DbConnectionInternal to, DbConnectionInternal from);
403
internal abstract void SetInnerConnectionTo(
DbConnection
owningObject, DbConnectionInternal to);
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionInternal.cs (5)
256
protected internal virtual DataTable GetSchema(DbConnectionFactory factory, DbConnectionPoolGroup poolGroup,
DbConnection
outerConnection, string collectionName, string?[]? restrictions)
290
internal virtual void OpenConnection(
DbConnection
outerConnection, DbConnectionFactory connectionFactory)
303
internal virtual bool TryOpenConnection(
DbConnection
outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource<DbConnectionInternal>? retry, DbConnectionOptions? userOptions)
308
internal virtual bool TryReplaceConnection(
DbConnection
outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource<DbConnectionInternal>? retry, DbConnectionOptions? userOptions)
313
protected bool TryOpenConnectionInternal(
DbConnection
outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource<DbConnectionInternal>? retry, DbConnectionOptions? userOptions)
src\libraries\Common\src\System\Data\ProviderBase\DbMetaDataFactory.cs (3)
104
private DataTable ExecuteCommand(DataRow requestedCollectionRow, string?[]? restrictions,
DbConnection
connection)
388
public virtual DataTable GetSchema(
DbConnection
connection, string collectionName, string?[]? restrictions)
498
protected virtual DataTable PrepareCollection(string collectionName, string?[]? restrictions,
DbConnection
connection)
System\Data\Odbc\OdbcCommand.cs (1)
260
protected override
DbConnection
? DbConnection
System\Data\Odbc\OdbcConnectionFactory.cs (8)
30
protected override DbConnectionInternal CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, object poolGroupProviderInfo, DbConnectionPool? pool,
DbConnection
? owningObject)
78
internal override DbConnectionPoolGroup? GetConnectionPoolGroup(
DbConnection
? connection)
88
internal override DbConnectionInternal? GetInnerConnection(
DbConnection
connection)
98
internal override void PermissionDemand(
DbConnection
outerConnection)
103
internal override void SetConnectionPoolGroup(
DbConnection
outerConnection, DbConnectionPoolGroup poolGroup)
112
internal override void SetInnerConnectionEvent(
DbConnection
owningObject, DbConnectionInternal to)
117
internal override bool SetInnerConnectionFrom(
DbConnection
owningObject, DbConnectionInternal to, DbConnectionInternal from)
127
internal override void SetInnerConnectionTo(
DbConnection
owningObject, DbConnectionInternal to)
System\Data\Odbc\OdbcFactory.cs (1)
26
public override
DbConnection
CreateConnection()
System\Data\Odbc\OdbcMetaDataFactory.cs (1)
1078
protected override DataTable PrepareCollection(string collectionName, string?[]? restrictions,
DbConnection
connection)
System\Data\Odbc\OdbcTransaction.cs (1)
29
protected override
DbConnection
? DbConnection
System.Data.OleDb (3)
artifacts\obj\System.Data.OleDb\Debug\net10.0\System.Data.OleDb.notsupported.cs (3)
29
protected override System.Data.Common.
DbConnection
? DbConnection { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } set { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } }
274
public override System.Data.Common.
DbConnection
CreateConnection() { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); }
484
protected override System.Data.Common.
DbConnection
? DbConnection { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_OleDb); } }