Class SqliteConnectionFactory
- Namespace
- Fdyay.IdentityServer.Dapper.Sql
- Assembly
- Fdyay.IdentityServer.Dapper.dll
Opens SQLite connections.
public sealed class SqliteConnectionFactory : IDbConnectionFactory
- Inheritance
-
SqliteConnectionFactory
- Implements
- Inherited Members
Constructors
SqliteConnectionFactory(string)
Creates a factory that opens connections with connectionString.
public SqliteConnectionFactory(string connectionString)
Parameters
connectionStringstringThe SQLite connection string. Held as given; nothing connects until OpenConnectionAsync(CancellationToken) is called.
Exceptions
- ArgumentException
connectionStringis null or empty.
Properties
Dialect
The SQL dialect for the configured provider.
public ISqlDialect Dialect { get; }
Property Value
Remarks
Always a SqliteDialect.
Methods
OpenConnectionAsync(CancellationToken)
Opens a new connection.
public Task<DbConnection> OpenConnectionAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
Remarks
A new SqliteConnection per call, already open; the caller disposes it.