Interface ISqlDatabaseConnector
Represents a DB connector.
public interface ISqlDatabaseConnector
Properties
Database
ISqlDatabase instance that this connector belongs to.
ISqlDatabase Database { get; }
Property Value
Methods
Connect()
Connects to the database.
[Pure]
IDbConnection Connect()
Returns
- IDbConnection
IDbConnection instance that represents an established connection.
Connect(string)
Connects to the database.
[Pure]
IDbConnection Connect(string options)
Parameters
options
stringPartial connection string that can be used to modify how the connection gets established.
Returns
- IDbConnection
IDbConnection instance that represents an established connection.
Remarks
Immutable connection string entries provided in options
will be ignored.
ConnectAsync(string, CancellationToken)
Connects to the database asynchronously.
[Pure]
ValueTask<IDbConnection> ConnectAsync(string options, CancellationToken cancellationToken = default)
Parameters
options
stringPartial connection string that can be used to modify how the connection gets established.
cancellationToken
CancellationTokenOptional CancellationToken instance.
Returns
- ValueTask<IDbConnection>
A task that returns an IDbConnection instance that represents an established connection.
Remarks
Immutable connection string entries provided in options
will be ignored.
ConnectAsync(CancellationToken)
Connects to the database asynchronously.
[Pure]
ValueTask<IDbConnection> ConnectAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenOptional CancellationToken instance.
Returns
- ValueTask<IDbConnection>
A task that returns an IDbConnection instance that represents an established connection.