Class TemporaryTableDisposer
- Assembly
- RentADeveloper.DbConnectionPlus.dll
Handles the disposal of a temporary database table. When disposed, drops the temporary table.
public sealed class TemporaryTableDisposer : IDisposable, IAsyncDisposable
- Inheritance
-
TemporaryTableDisposer
- Implements
- Inherited Members
Constructors
TemporaryTableDisposer(Action, Func<ValueTask>)
Initializes a new instance of the TemporaryTableDisposer class.
public TemporaryTableDisposer(Action dropTableFunction, Func<ValueTask> dropTableAsyncFunction)
Parameters
dropTableFunctionActionThe function that drops the table.
dropTableAsyncFunctionFunc<ValueTask>The function that asynchronously drops the table.
Exceptions
Methods
Dispose()
Drops the temporary table.
public void Dispose()
DisposeAsync()
Asynchronously drops the temporary table.
public ValueTask DisposeAsync()
Returns
- ValueTask
A task that represents the asynchronous operation.