Search Results for

    Show / Hide Table of Contents

    Interface IQueryCommand<TEntity, TReturn>

    Represents a command which performs queries and materialize the results to entities.

    Namespace: Venflow.Commands
    Assembly: Venflow.dll
    Syntax
    public interface IQueryCommand<TEntity, TReturn> : IVenflowCommand<TEntity>, IAsyncDisposable where TEntity : class, new()
        where TReturn : class, new()
    Type Parameters
    Name Description
    TEntity

    The type of the entity which represents the result of the query.

    TReturn

    The return type of the query.

    Methods

    | Improve this Doc View Source

    PrepareAsync(CancellationToken)

    Asynchronously prepares the current SQL command on the database.

    Declaration
    Task<IQueryCommand<TEntity, TReturn>> PrepareAsync(CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token, which is used to cancel the operation

    Returns
    Type Description
    Task<IQueryCommand<TEntity, TReturn>>
    | Improve this Doc View Source

    QueryAsync(CancellationToken)

    Asynchronously performs queries and materializes the result.

    Declaration
    Task<TReturn> QueryAsync(CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token, which is used to cancel the operation

    Returns
    Type Description
    Task<TReturn>

    A task representing the asynchronous operation, with the materialized result of the query; null otherwise.

    | Improve this Doc View Source

    UnprepareAsync(CancellationToken)

    Asynchronously un-prepares the current SQL command on the database.

    Declaration
    Task<IQueryCommand<TEntity, TReturn>> UnprepareAsync(CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token, which is used to cancel the operation

    Returns
    Type Description
    Task<IQueryCommand<TEntity, TReturn>>

    Theme

    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 Twenty