Class TemporaryTableDisposer
Handles the disposal of a temporary database table. When disposed, drops the temporary table.
Inherited Members
Namespace: RentADeveloper.DbConnectionPlus.DatabaseAdapters
Assembly: RentADeveloper.DbConnectionPlus.dll
Syntax
public sealed class TemporaryTableDisposer : IDisposable, IAsyncDisposable
Constructors
View SourceTemporaryTableDisposer(Action, Func<ValueTask>)
Initializes a new instance of the TemporaryTableDisposer class.
Declaration
public TemporaryTableDisposer(Action dropTableFunction, Func<ValueTask> dropTableAsyncFunction)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | dropTableFunction | The function that drops the table. |
| Func<ValueTask> | dropTableAsyncFunction | The function that asynchronously drops the table. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
Methods
View SourceDispose()
Drops the temporary table.
Declaration
public void Dispose()
DisposeAsync()
Asynchronously drops the temporary table.
Declaration
public ValueTask DisposeAsync()
Returns
| Type | Description |
|---|---|
| ValueTask | A task that represents the asynchronous operation. |