Class QueryProviderFactories
Represent set of registered Query provider factories.
Inheritance
System.Object
QueryProviderFactories
Namespace: Kros.KORM.Query
Assembly: Kros.KORM.dll
Syntax
public static class QueryProviderFactories
Methods
GetFactory(DbConnection)
Gets the factory by connection.
Declaration
public static IQueryProviderFactory GetFactory(DbConnection connection)
Parameters
Type | Name | Description |
---|---|---|
System.Data.Common.DbConnection | connection | The connection. |
Returns
Type | Description |
---|---|
IQueryProviderFactory | Instance of IQueryProviderFactory. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | When factory for specific |
GetFactory(String)
Gets the factory by provider name.
Declaration
public static IQueryProviderFactory GetFactory(string providerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | providerName | Db provider name. |
Returns
Type | Description |
---|---|
IQueryProviderFactory | Instance of IQueryProviderFactory. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | When factory for specific |
Register<TConnection>(String, IQueryProviderFactory)
Registers the specified query provider factory.
Declaration
public static void Register<TConnection>(string providerName, IQueryProviderFactory queryProviderFactory)
where TConnection : DbConnection
Parameters
Type | Name | Description |
---|---|---|
System.String | providerName | Name of the provider. |
IQueryProviderFactory | queryProviderFactory | The query provider factory. |
Type Parameters
Name | Description |
---|---|
TConnection | The type of the connection. |