Skip to content

IPrepareStatementFilter features doc #85

Open
@Ahoo-Wang

Description

@Ahoo-Wang
Member
SmartSqlBuilder = new SmartSqlBuilder()
                .UseXmlConfig()
                .UseLoggerFactory(LoggerFactory)
                .UseAlias(GLOBAL_SMART_SQL)
                .AddFilter<TestPrepareStatementFilter>()
                .Build();
public class TestPrepareStatementFilter : IPrepareStatementFilter, ISetupSmartSql
    {
        private ILogger<TestPrepareStatementFilter> _logger;

        public void OnInvoking(ExecutionContext context)
        {
            _logger.LogDebug("TestPrepareStatementFilter.OnInvoking");
        }

        public void OnInvoked(ExecutionContext context)
        {
            _logger.LogDebug("TestPrepareStatementFilter.OnInvoked");
        }

        public Task OnInvokingAsync(ExecutionContext context)
        {
            _logger.LogDebug("TestPrepareStatementFilter.OnInvokingAsync");
            return Task.CompletedTask;
        }

        public Task OnInvokedAsync(ExecutionContext context)
        {
            _logger.LogDebug("TestPrepareStatementFilter.OnInvokedAsync");
            return Task.CompletedTask;
        }

        public void SetupSmartSql(SmartSqlBuilder smartSqlBuilder)
        {
            _logger = smartSqlBuilder.LoggerFactory.CreateLogger<TestPrepareStatementFilter>();
        }
    }

-> https://github.com/Smart-Kit/SmartSql-Docs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @Ahoo-Wang

      Issue actions

        IPrepareStatementFilter features doc · Issue #85 · dotnetcore/SmartSql