Interface ITransactionRepository<TModel, TId>
Repository for managing transactions.
Namespace: Simplic.Data
Assembly: Simplic.Data.dll
Syntax
public interface ITransactionRepository<TModel, TId>
where TModel : new()
Type Parameters
| Name | Description |
|---|---|
| TModel | |
| TId |
Methods
| Improve this Doc View SourceCreateAsync(TModel, ITransaction)
Asynchronously adds creation of a new object object to the transaction.
Adds a created event to the event transaction.
Declaration
Task CreateAsync(TModel obj, ITransaction transaction)
Parameters
| Type | Name | Description |
|---|---|---|
| TModel | obj | Object to create. |
| ITransaction | transaction | Transaction to add to. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | Task. |
DeleteAsync(TId, ITransaction)
Asynchronously adds deletion of an object object to the transaction.
Declaration
Task DeleteAsync(TId id, ITransaction transaction)
Parameters
| Type | Name | Description |
|---|---|---|
| TId | id | Identifier of object to delete. |
| ITransaction | transaction | Transaction to add to. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | Task. |
UpdateAsync(TModel, ITransaction)
Asynchronously adds update of an object object to the transaction.
Declaration
Task UpdateAsync(TModel obj, ITransaction transaction)
Parameters
| Type | Name | Description |
|---|---|---|
| TModel | obj | Object to update. |
| ITransaction | transaction | Transaction to add to. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | Task. |