Interface IFluentTransactionBuilder
Builds and stores all information for a transaction that is represented in fluent-style
Namespace: Simplic.Data
Assembly: Simplic.Data.dll
Syntax
public interface IFluentTransactionBuilder
Properties
| Improve this Doc View SourceTasks
Gets the actual list of tasks to execute when committing or aborting
Declaration
IList<Func<Task>> Tasks { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.Func<System.Threading.Tasks.Task>> |
TransactionService
Gets the transaction service for executing transaction operations on commit and abort
Declaration
ITransactionService TransactionService { get; }
Property Value
Type | Description |
---|---|
ITransactionService |
Methods
| Improve this Doc View SourceAddService<TModel, TId>(ITransactionRepository<TModel, TId>)
Adds a service-instance to the current builder
Declaration
void AddService<TModel, TId>(ITransactionRepository<TModel, TId> service)
where TModel : new()
Parameters
Type | Name | Description |
---|---|---|
ITransactionRepository<TModel, TId> | service | Service instance |
Type Parameters
Name | Description |
---|---|
TModel | Object type |
TId | Unique id type |
GetService<TModel, TId>()
Gets a service from the builder
Declaration
ITransactionRepository<TModel, TId> GetService<TModel, TId>()
where TModel : new()
Returns
Type | Description |
---|---|
ITransactionRepository<TModel, TId> | Service instance |
Type Parameters
Name | Description |
---|---|
TModel | Object type |
TId | Unique id type |
GetTransaction()
Creates a new transaction if no transaction is existing. Only one instance will be created during builder-lifetime.
Declaration
Task<ITransaction> GetTransaction()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ITransaction> | Transaction instance |