using Connected.Middleware; namespace Connected.Services.Middleware { public abstract class ServiceMiddleware : MiddlewareComponent, IServiceMiddleware { public async Task Commit() { await OnCommit(); } protected virtual async Task OnCommit() { await Task.CompletedTask; } public async Task Rollback() { await OnRollback(); } protected virtual async Task OnRollback() { await Task.CompletedTask; } } }