Search Results for

    Show / Hide Table of Contents

    Interface IDatabaseConnection

    Database Connection

    Namespace: Gossip.Connection
    Assembly: Gossip.dll
    Syntax
    public interface IDatabaseConnection : IDisposable

    Methods

    | Improve this Doc View Source

    BeginTransaction()

    Begin a transaction.

    Declaration
    ITransaction BeginTransaction()
    Returns
    Type Description
    ITransaction
    | Improve this Doc View Source

    BeginTransaction(System.Data.IsolationLevel)

    Begin a transaction with a specified .

    Declaration
    ITransaction BeginTransaction(System.Data.IsolationLevel isolationLevel)
    Parameters
    Type Name Description
    System.Data.IsolationLevel isolationLevel

    The of the transaction.

    Returns
    Type Description
    ITransaction
    | Improve this Doc View Source

    BeginTransaction(System.Data.IsolationLevel, String)

    Begin a named transaction with a specified .

    Declaration
    ITransaction BeginTransaction(System.Data.IsolationLevel isolationLevel, string transactionName)
    Parameters
    Type Name Description
    System.Data.IsolationLevel isolationLevel

    The of the transaction.

    String transactionName

    The transaction name.

    Returns
    Type Description
    ITransaction
    | Improve this Doc View Source

    BeginTransaction(String)

    Begin a named transaction.

    Declaration
    ITransaction BeginTransaction(string transactionName)
    Parameters
    Type Name Description
    String transactionName

    The transaction name.

    Returns
    Type Description
    ITransaction
    | Improve this Doc View Source

    Configure(String, String)

    Configures the database

    Declaration
    IQueryConfigurator Configure(string callerMemberName = "", string callerFilePath = "")
    Parameters
    Type Name Description
    String callerMemberName

    (internal use) for logging

    String callerFilePath

    (internal use) for logging

    Returns
    Type Description
    IQueryConfigurator

    IQueryConfigurator

    | Improve this Doc View Source

    EnlistTransaction(Transaction)

    Enlist a transaction

    Declaration
    void EnlistTransaction(Transaction transaction)
    Parameters
    Type Name Description
    Transaction transaction

    transaction

    | Improve this Doc View Source

    Execute(String, Object, String, String)

    Execute parameterized SQL.

    Declaration
    int Execute(string sql, object param = null, string callerMemberName = "", string callerFilePath = "")
    Parameters
    Type Name Description
    String sql

    The SQL to execute for this query.

    Object param

    The parameters to use for this query.

    String callerMemberName

    (internal use) for logging

    String callerFilePath

    (internal use) for logging

    Returns
    Type Description
    Int32

    The number of rows affected.

    | Improve this Doc View Source

    ExecuteAsync(String, Object, String, String)

    Execute parameterized SQL.

    Declaration
    Task<int> ExecuteAsync(string sql, object param = null, string callerMemberName = "", string callerFilePath = "")
    Parameters
    Type Name Description
    String sql

    SQL query to run

    Object param

    Parameters to pass into the SQL query

    String callerMemberName

    Caller name

    String callerFilePath

    Caller location

    Returns
    Type Description
    Task<Int32>

    Integer number of rows affected

    | Improve this Doc View Source

    Query<T>(String, Object, String, String)

    Execute parameterized sql

    Declaration
    IEnumerable<T> Query<T>(string sql, object param = null, string callerMemberName = "", string callerFilePath = "")
    Parameters
    Type Name Description
    String sql

    The SQL to execute for this query.

    Object param

    The parameters to use for this query.

    String callerMemberName

    (internal use) for logging

    String callerFilePath

    (internal use) for logging

    Returns
    Type Description
    IEnumerable<T>

    Result of the sql query, a collection of type T

    Type Parameters
    Name Description
    T

    generic type

    | Improve this Doc View Source

    QueryAsync<T>(String, Object, String, String)

    Execute parameterized SQL.

    Declaration
    Task<IEnumerable<T>> QueryAsync<T>(string sql, object param = null, string callerMemberName = "", string callerFilePath = "")
    Parameters
    Type Name Description
    String sql

    SQL query to run

    Object param

    Parameters to pass into the SQL query

    String callerMemberName

    (internal use) for logging

    String callerFilePath

    (internal use) for logging

    Returns
    Type Description
    Task<IEnumerable<T>>

    SQL query result

    Type Parameters
    Name Description
    T

    Generic return type

    | Improve this Doc View Source

    QueryFirstOrDefaultAsync<T>(String, Object, String, String)

    Executes Parameterized SQL

    Declaration
    Task<T> QueryFirstOrDefaultAsync<T>(string sql, object param = null, string callerMemberName = "", string callerFilePath = "")
    Parameters
    Type Name Description
    String sql

    The SQL to execute for this query.

    Object param

    The parameters to use for this query.

    String callerMemberName

    (internal use) for logging

    String callerFilePath

    (internal use) for logging

    Returns
    Type Description
    Task<T>

    The first result of the sql query

    Type Parameters
    Name Description
    T

    Generic Type

    | Improve this Doc View Source

    QuerySingleOrDefault<T>(String, String, String)

    Executes SQL

    Declaration
    T QuerySingleOrDefault<T>(string sql, string callerMemberName = "", string callerFilePath = "")
    Parameters
    Type Name Description
    String sql

    The SQL to execute for this query.

    String callerMemberName

    (internal use) for logging

    String callerFilePath

    (internal use) for logging

    Returns
    Type Description
    T

    The first result of the sql query

    Type Parameters
    Name Description
    T

    Generic Type

    | Improve this Doc View Source

    QuerySingleOrDefaultAsync<T>(String, String, String)

    Execute sql

    Declaration
    Task<T> QuerySingleOrDefaultAsync<T>(string sql, string callerMemberName = "", string callerFilePath = "")
    Parameters
    Type Name Description
    String sql

    The SQL to execute for this query.

    String callerMemberName

    (internal use) for logging

    String callerFilePath

    (internal use) for logging

    Returns
    Type Description
    Task<T>

    Result of the sql query, a collection of type T

    Type Parameters
    Name Description
    T

    generic type

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX