TransactionKit Class
The factory that creates queries.
C#
public sealed class TransactionKit
- Inheritance
-
Transaction
Kit
Constructors
Transaction |
The factory that creates queries. |
Methods
Execute(Action<Query>) |
Executes queries within a single transaction. |
Execute<T>(Func<Query, T>) |
Executes queries within a single transaction and returns the result. |
Equals(object) | (Inherited from object) |
GetHashCode() | (Inherited from object) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |
Constructors Detail
TransactionKit(string, Action<Func<string>>)
The factory that creates queries.
C#
public TransactionKit(string databasePath, Action<Func<string>> logger)
Parameters
- databasePath
- string
The path of the database file.
Methods Detail
Execute(Action<Query>)
Executes queries within a single transaction.
C#
public void Execute(Action<Query> action)
Parameters
Remarks
If the action
throws an exception, this method
performs the rollback.
Execute<T>(Func<Query, T>)
Executes queries within a single transaction and returns the result.
C#
public T Execute<T>(Func<Query, T> apply)
Type Parameters
- T
The type of the result.
Parameters
Returns
T
The result.
Remarks
If the apply
throws an exception, this method
performs the rollback.