OrmLiteConnectionFactoryExtensions
Assembly: ServiceStack.OrmLite.dll
View Source
Declaration
public static class OrmLiteConnectionFactoryExtensions : object
Methods
Open(IDbConnectionFactory)
Alias for ServiceStack.OrmLite.OrmLiteConnectionFactoryExtensions.OpenDbConnection(ServiceStack.Data.IDbConnectionFactory%2cSystem.String)
View Source
Declaration
public static IDbConnection Open(this IDbConnectionFactory connectionFactory)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
OpenDbConnectionAsync(IDbConnectionFactory, CancellationToken)
Alias for OpenDbConnectionAsync
View Source
Declaration
public static Task<IDbConnection> OpenDbConnectionAsync(this IDbConnectionFactory connectionFactory, CancellationToken token = null)
Returns
Task<IDbConnection>
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
CancellationToken | token |
OpenAsync(IDbConnectionFactory, CancellationToken)
View Source
Declaration
public static Task<IDbConnection> OpenAsync(this IDbConnectionFactory connectionFactory, CancellationToken token = null)
Returns
Task<IDbConnection>
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
CancellationToken | token |
OpenAsync(IDbConnectionFactory, String, CancellationToken)
Alias for OpenDbConnectionAsync
View Source
Declaration
public static Task<IDbConnection> OpenAsync(this IDbConnectionFactory connectionFactory, string namedConnection, CancellationToken token = null)
Returns
Task<IDbConnection>
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
System.String | namedConnection |
CancellationToken | token |
Open(IDbConnectionFactory, String)
Alias for OpenDbConnection
View Source
Declaration
public static IDbConnection Open(this IDbConnectionFactory connectionFactory, string namedConnection)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
System.String | namedConnection |
OpenDbConnection(IDbConnectionFactory, String)
Alias for OpenDbConnection
View Source
Declaration
public static IDbConnection OpenDbConnection(this IDbConnectionFactory connectionFactory, string namedConnection)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
System.String | namedConnection |
OpenDbConnectionAsync(IDbConnectionFactory, String, CancellationToken)
View Source
Declaration
public static Task<IDbConnection> OpenDbConnectionAsync(this IDbConnectionFactory connectionFactory, string namedConnection, CancellationToken token = null)
Returns
Task<IDbConnection>
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
System.String | namedConnection |
CancellationToken | token |
OpenDbConnectionString(IDbConnectionFactory, String)
Alias for OpenDbConnection
View Source
Declaration
public static IDbConnection OpenDbConnectionString(this IDbConnectionFactory connectionFactory, string connectionString)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
System.String | connectionString |
OpenDbConnectionString(IDbConnectionFactory, String, String)
View Source
Declaration
public static IDbConnection OpenDbConnectionString(this IDbConnectionFactory connectionFactory, string connectionString, string providerName)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
System.String | connectionString |
System.String | providerName |
OpenDbConnectionStringAsync(IDbConnectionFactory, String, CancellationToken)
View Source
Declaration
public static Task<IDbConnection> OpenDbConnectionStringAsync(this IDbConnectionFactory connectionFactory, string connectionString, CancellationToken token = null)
Returns
Task<IDbConnection>
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
System.String | connectionString |
CancellationToken | token |
OpenDbConnectionStringAsync(IDbConnectionFactory, String, String, CancellationToken)
View Source
Declaration
public static Task<IDbConnection> OpenDbConnectionStringAsync(this IDbConnectionFactory connectionFactory, string connectionString, string providerName, CancellationToken token = null)
Returns
Task<IDbConnection>
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
System.String | connectionString |
System.String | providerName |
CancellationToken | token |
GetDialectProvider(IDbConnectionFactory, ConnectionInfo)
View Source
Declaration
public static IOrmLiteDialectProvider GetDialectProvider(this IDbConnectionFactory connectionFactory, ConnectionInfo dbInfo)
Returns
ServiceStack.OrmLite.IOrmLiteDialectProvider
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
ServiceStack.ConnectionInfo | dbInfo |
GetDialectProvider(IDbConnectionFactory, String, String)
View Source
Declaration
public static IOrmLiteDialectProvider GetDialectProvider(this IDbConnectionFactory connectionFactory, string providerName = null, string namedConnection = null)
Returns
ServiceStack.OrmLite.IOrmLiteDialectProvider
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | connectionFactory |
System.String | providerName |
System.String | namedConnection |
ToDbConnection(IDbConnection)
View Source
Declaration
public static IDbConnection ToDbConnection(this IDbConnection db)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
IDbConnection | db |
ToDbCommand(IDbCommand)
View Source
Declaration
public static IDbCommand ToDbCommand(this IDbCommand dbCmd)
Returns
IDbCommand
Parameters
Type | Name |
---|---|
IDbCommand | dbCmd |
ToDbTransaction(IDbTransaction)
View Source
Declaration
public static IDbTransaction ToDbTransaction(this IDbTransaction dbTrans)
Returns
IDbTransaction
Parameters
Type | Name |
---|---|
IDbTransaction | dbTrans |
GetConnectionId(IDbConnection)
View Source
Declaration
public static Guid GetConnectionId(this IDbConnection db)
Returns
Guid
Parameters
Type | Name |
---|---|
IDbConnection | db |
GetConnectionId(IDbCommand)
View Source
Declaration
public static Guid GetConnectionId(this IDbCommand dbCmd)
Returns
Guid
Parameters
Type | Name |
---|---|
IDbCommand | dbCmd |
RegisterConnection(IDbConnectionFactory, String, String, IOrmLiteDialectProvider)
View Source
Declaration
public static void RegisterConnection(this IDbConnectionFactory dbFactory, string namedConnection, string connectionString, IOrmLiteDialectProvider dialectProvider)
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | dbFactory |
System.String | namedConnection |
System.String | connectionString |
ServiceStack.OrmLite.IOrmLiteDialectProvider | dialectProvider |
RegisterConnection(IDbConnectionFactory, String, OrmLiteConnectionFactory)
View Source
Declaration
public static void RegisterConnection(this IDbConnectionFactory dbFactory, string namedConnection, OrmLiteConnectionFactory connectionFactory)
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | dbFactory |
System.String | namedConnection |
ServiceStack.OrmLite.OrmLiteConnectionFactory | connectionFactory |
OpenDbConnection(IDbConnectionFactory, ConnectionInfo)
View Source
Declaration
public static IDbConnection OpenDbConnection(this IDbConnectionFactory dbFactory, ConnectionInfo connInfo)
Returns
IDbConnection
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | dbFactory |
ServiceStack.ConnectionInfo | connInfo |
OpenDbConnectionAsync(IDbConnectionFactory, ConnectionInfo)
View Source
Declaration
public static async Task<IDbConnection> OpenDbConnectionAsync(this IDbConnectionFactory dbFactory, ConnectionInfo connInfo)
Returns
Task<IDbConnection>
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | dbFactory |
ServiceStack.ConnectionInfo | connInfo |
GetNamedConnections(IDbConnectionFactory)
View Source
Declaration
public static Dictionary<string, OrmLiteConnectionFactory> GetNamedConnections(this IDbConnectionFactory dbFactory)
Returns
Dictionary<System.String,ServiceStack.OrmLite.OrmLiteConnectionFactory>
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | dbFactory |