OrmLiteConnection
Wrapper IDbConnection class to allow for connection sharing, mocking, etc.
Assembly: ServiceStack.OrmLite.dll
View Source
Declaration
public class OrmLiteConnection : IDbConnection, IHasDbConnection, IHasDbTransaction, IHasDialectProvider
Properties
Transaction
View Source
Declaration
public IDbTransaction Transaction { get; set; }
DbTransaction
View Source
Declaration
public IDbTransaction DbTransaction { get; }
DialectProvider
View Source
Declaration
public IOrmLiteDialectProvider DialectProvider { get; set; }
LastCommandText
View Source
Declaration
public string LastCommandText { get; set; }
CommandTimeout
View Source
Declaration
public int? CommandTimeout { get; set; }
ConnectionId
View Source
Declaration
public Guid ConnectionId { get; set; }
DbConnection
View Source
Declaration
public IDbConnection DbConnection { get; }
ConnectionString
View Source
Declaration
public string ConnectionString { get; set; }
ConnectionTimeout
View Source
Declaration
public int ConnectionTimeout { get; }
Database
View Source
Declaration
public string Database { get; }
State
View Source
Declaration
public ConnectionState State { get; }
AutoDisposeConnection
View Source
Declaration
public bool AutoDisposeConnection { get; set; }
Fields
Factory
View Source
Declaration
public readonly OrmLiteConnectionFactory Factory
Methods
Dispose()
View Source
Declaration
public void Dispose()
BeginTransaction()
View Source
Declaration
public IDbTransaction BeginTransaction()
Returns
IDbTransaction
BeginTransaction(IsolationLevel)
View Source
Declaration
public IDbTransaction BeginTransaction(IsolationLevel isolationLevel)
Returns
IDbTransaction
Parameters
Type | Name |
---|---|
IsolationLevel | isolationLevel |
Close()
View Source
Declaration
public void Close()
ChangeDatabase(String)
View Source
Declaration
public void ChangeDatabase(string databaseName)
Parameters
Type | Name |
---|---|
System.String | databaseName |
CreateCommand()
View Source
Declaration
public IDbCommand CreateCommand()
Returns
IDbCommand
Open()
View Source
Declaration
public void Open()
OpenAsync(CancellationToken)
View Source
Declaration
public async Task OpenAsync(CancellationToken token = null)
Returns
Task
Parameters
Type | Name |
---|---|
CancellationToken | token |