Skip to main content

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
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory

OpenDbConnectionAsync(IDbConnectionFactory, CancellationToken)

Alias for OpenDbConnectionAsync

View Source
Declaration
public static Task<IDbConnection> OpenDbConnectionAsync(this IDbConnectionFactory connectionFactory, CancellationToken token = null)
Returns

Task<IDbConnection>

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
CancellationTokentoken

OpenAsync(IDbConnectionFactory, CancellationToken)

View Source
Declaration
public static Task<IDbConnection> OpenAsync(this IDbConnectionFactory connectionFactory, CancellationToken token = null)
Returns

Task<IDbConnection>

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
CancellationTokentoken

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
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
System.StringnamedConnection
CancellationTokentoken

Open(IDbConnectionFactory, String)

Alias for OpenDbConnection

View Source
Declaration
public static IDbConnection Open(this IDbConnectionFactory connectionFactory, string namedConnection)
Returns

IDbConnection

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
System.StringnamedConnection

OpenDbConnection(IDbConnectionFactory, String)

Alias for OpenDbConnection

View Source
Declaration
public static IDbConnection OpenDbConnection(this IDbConnectionFactory connectionFactory, string namedConnection)
Returns

IDbConnection

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
System.StringnamedConnection

OpenDbConnectionAsync(IDbConnectionFactory, String, CancellationToken)

View Source
Declaration
public static Task<IDbConnection> OpenDbConnectionAsync(this IDbConnectionFactory connectionFactory, string namedConnection, CancellationToken token = null)
Returns

Task<IDbConnection>

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
System.StringnamedConnection
CancellationTokentoken

OpenDbConnectionString(IDbConnectionFactory, String)

Alias for OpenDbConnection

View Source
Declaration
public static IDbConnection OpenDbConnectionString(this IDbConnectionFactory connectionFactory, string connectionString)
Returns

IDbConnection

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
System.StringconnectionString

OpenDbConnectionString(IDbConnectionFactory, String, String)

View Source
Declaration
public static IDbConnection OpenDbConnectionString(this IDbConnectionFactory connectionFactory, string connectionString, string providerName)
Returns

IDbConnection

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
System.StringconnectionString
System.StringproviderName

OpenDbConnectionStringAsync(IDbConnectionFactory, String, CancellationToken)

View Source
Declaration
public static Task<IDbConnection> OpenDbConnectionStringAsync(this IDbConnectionFactory connectionFactory, string connectionString, CancellationToken token = null)
Returns

Task<IDbConnection>

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
System.StringconnectionString
CancellationTokentoken

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
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
System.StringconnectionString
System.StringproviderName
CancellationTokentoken

GetDialectProvider(IDbConnectionFactory, ConnectionInfo)

View Source
Declaration
public static IOrmLiteDialectProvider GetDialectProvider(this IDbConnectionFactory connectionFactory, ConnectionInfo dbInfo)
Returns

ServiceStack.OrmLite.IOrmLiteDialectProvider

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
ServiceStack.ConnectionInfodbInfo

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
TypeName
ServiceStack.Data.IDbConnectionFactoryconnectionFactory
System.StringproviderName
System.StringnamedConnection

ToDbConnection(IDbConnection)

View Source
Declaration
public static IDbConnection ToDbConnection(this IDbConnection db)
Returns

IDbConnection

Parameters
TypeName
IDbConnectiondb

ToDbCommand(IDbCommand)

View Source
Declaration
public static IDbCommand ToDbCommand(this IDbCommand dbCmd)
Returns

IDbCommand

Parameters
TypeName
IDbCommanddbCmd

ToDbTransaction(IDbTransaction)

View Source
Declaration
public static IDbTransaction ToDbTransaction(this IDbTransaction dbTrans)
Returns

IDbTransaction

Parameters
TypeName
IDbTransactiondbTrans

GetConnectionId(IDbConnection)

View Source
Declaration
public static Guid GetConnectionId(this IDbConnection db)
Returns

Guid

Parameters
TypeName
IDbConnectiondb

GetConnectionId(IDbCommand)

View Source
Declaration
public static Guid GetConnectionId(this IDbCommand dbCmd)
Returns

Guid

Parameters
TypeName
IDbCommanddbCmd

RegisterConnection(IDbConnectionFactory, String, String, IOrmLiteDialectProvider)

View Source
Declaration
public static void RegisterConnection(this IDbConnectionFactory dbFactory, string namedConnection, string connectionString, IOrmLiteDialectProvider dialectProvider)
Parameters
TypeName
ServiceStack.Data.IDbConnectionFactorydbFactory
System.StringnamedConnection
System.StringconnectionString
ServiceStack.OrmLite.IOrmLiteDialectProviderdialectProvider

RegisterConnection(IDbConnectionFactory, String, OrmLiteConnectionFactory)

View Source
Declaration
public static void RegisterConnection(this IDbConnectionFactory dbFactory, string namedConnection, OrmLiteConnectionFactory connectionFactory)
Parameters
TypeName
ServiceStack.Data.IDbConnectionFactorydbFactory
System.StringnamedConnection
ServiceStack.OrmLite.OrmLiteConnectionFactoryconnectionFactory

OpenDbConnection(IDbConnectionFactory, ConnectionInfo)

View Source
Declaration
public static IDbConnection OpenDbConnection(this IDbConnectionFactory dbFactory, ConnectionInfo connInfo)
Returns

IDbConnection

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactorydbFactory
ServiceStack.ConnectionInfoconnInfo

OpenDbConnectionAsync(IDbConnectionFactory, ConnectionInfo)

View Source
Declaration
public static async Task<IDbConnection> OpenDbConnectionAsync(this IDbConnectionFactory dbFactory, ConnectionInfo connInfo)
Returns

Task<IDbConnection>

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactorydbFactory
ServiceStack.ConnectionInfoconnInfo

GetNamedConnections(IDbConnectionFactory)

View Source
Declaration
public static Dictionary<string, OrmLiteConnectionFactory> GetNamedConnections(this IDbConnectionFactory dbFactory)
Returns

Dictionary<System.String,ServiceStack.OrmLite.OrmLiteConnectionFactory>

Parameters
TypeName
ServiceStack.Data.IDbConnectionFactorydbFactory