# Interface INpgsqlRelationalConnection

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    public interface INpgsqlRelationalConnection : IRelationalConnection, IRelationalTransactionManager, IDbContextTransactionManager, IResettableService, IDisposable, IAsyncDisposable

Inherited Members
  IRelationalConnection.SetDbConnection(DbConnection, bool)
  IRelationalConnection.Open(bool)
  IRelationalConnection.OpenAsync(CancellationToken, bool)
  IRelationalConnection.Close()
  IRelationalConnection.CloseAsync()
  IRelationalConnection.RentCommand()
  IRelationalConnection.ReturnCommand(IRelationalCommand)
  IRelationalConnection.ConnectionString
  IRelationalConnection.DbConnection
  IRelationalConnection.Context
  IRelationalConnection.ConnectionId
  IRelationalConnection.CommandTimeout
  IRelationalConnection.CurrentTransaction
  IRelationalTransactionManager.BeginTransaction(IsolationLevel)
  IRelationalTransactionManager.BeginTransactionAsync(IsolationLevel, CancellationToken)
  IRelationalTransactionManager.UseTransaction(DbTransaction)
  IRelationalTransactionManager.UseTransaction(DbTransaction, Guid)
  IRelationalTransactionManager.UseTransactionAsync(DbTransaction, CancellationToken)
  IRelationalTransactionManager.UseTransactionAsync(DbTransaction, Guid, CancellationToken)
  IDbContextTransactionManager.BeginTransaction()
  IDbContextTransactionManager.BeginTransactionAsync(CancellationToken)
  IDbContextTransactionManager.CommitTransaction()
  IDbContextTransactionManager.CommitTransactionAsync(CancellationToken)
  IDbContextTransactionManager.RollbackTransaction()
  IDbContextTransactionManager.RollbackTransactionAsync(CancellationToken)
  IResettableService.ResetState()
  IResettableService.ResetStateAsync(CancellationToken)
  IDisposable.Dispose()
  IAsyncDisposable.DisposeAsync()

## Properties

### DataSource

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    DbDataSource? DataSource { get; }

#### Property Value

DbDataSource

## Methods

### CloneWith(string, bool, CancellationToken)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    ValueTask<INpgsqlRelationalConnection> CloneWith(string connectionString, bool async, CancellationToken cancellationToken = default)

#### Parameters

`connectionString` string
`async` bool
`cancellationToken` CancellationToken

#### Returns

ValueTask<INpgsqlRelationalConnection>

### CreateAdminConnection()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    INpgsqlRelationalConnection CreateAdminConnection()

#### Returns

INpgsqlRelationalConnection