DbConnectionFactory
Namespace: MJCZone.DapperMatic.AspNetCore.Factories
Assembly: MJCZone.DapperMatic.AspNetCore
Summary
Creates connections with the drivers the application registered with DbProviderFactory): DapperMatic bundles none.
Inheritance
Implemented Interfaces:
sealed public
Contents
Constructors (1) | Methods (5)
Constructors
DbConnectionFactory
Initializes a new instance of the DbConnectionFactory class.
csharp
DbConnectionFactory(DapperMaticOptions} options)Parameters
- options (DapperMaticOptions}) - The DapperMatic options, which hold the registered drivers.
Methods
CreateConnection
Creates a database connection for the specified provider and connection string.
csharp
IDbConnection CreateConnection(string provider, string connectionString)Parameters
- provider (string) - The database provider: SqlServer, PostgreSql, MySql (or MariaDb) or Sqlite.
- connectionString (string) - The connection string.
Returns
Type: IDbConnection
A connection, not yet open.
GetType
csharp
GetType()ToString
csharp
ToString()Equals
csharp
Equals()GetHashCode
csharp
GetHashCode()