Search Results for

    Show / Hide Table of Contents

    Interface IDatabaseGateway

    Executes SQL statements against a database. Implement this to plug in a data access library other than Dapper.

    Namespace: Activout.DatabaseClient
    Assembly: Activout.DatabaseClient.dll
    Syntax
    public interface IDatabaseGateway

    Methods

    | Edit this page View Source

    BeginTransaction(IsolationLevel)

    Begins a transaction.

    Declaration
    IDbTransaction BeginTransaction(IsolationLevel isolationLevel)
    Parameters
    Type Name Description
    IsolationLevel isolationLevel

    The isolation level.

    Returns
    Type Description
    IDbTransaction

    The transaction.

    | Edit this page View Source

    ExecuteAsync(SqlStatement)

    Executes a statement that does not return rows.

    Declaration
    Task<int> ExecuteAsync(SqlStatement statement)
    Parameters
    Type Name Description
    SqlStatement statement

    The statement.

    Returns
    Type Description
    Task<int>

    The number of affected rows.

    | Edit this page View Source

    QueryAsync(SqlStatement)

    Runs a query and maps all rows to EffectiveType.

    Declaration
    Task<IEnumerable<object>> QueryAsync(SqlStatement statement)
    Parameters
    Type Name Description
    SqlStatement statement

    The statement.

    Returns
    Type Description
    Task<IEnumerable<object>>

    The mapped rows.

    | Edit this page View Source

    QueryFirstOrDefaultAsync(SqlStatement)

    Runs a query and maps the first row to EffectiveType.

    Declaration
    Task<object?> QueryFirstOrDefaultAsync(SqlStatement statement)
    Parameters
    Type Name Description
    SqlStatement statement

    The statement.

    Returns
    Type Description
    Task<object>

    The mapped row, or null if there are no rows.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX