Table of Contents

Interface IQueryRunner

Namespace
LinqToDB.Linq
Assembly
linq2db.dll
public interface IQueryRunner : IDisposable, IAsyncDisposable
Inherited Members
Extension Methods

Properties

DataContext

IDataContext DataContext { get; }

Property Value

IDataContext

Expression

Expression Expression { get; }

Property Value

Expression

MapperExpression

Expression? MapperExpression { get; set; }

Property Value

Expression

Parameters

object?[]? Parameters { get; }

Property Value

object[]

Preambles

object?[]? Preambles { get; }

Property Value

object[]

QueryNumber

int QueryNumber { get; set; }

Property Value

int

RowsCount

int RowsCount { get; set; }

Property Value

int

Methods

ExecuteNonQuery()

Executes query and returns number of affected records.

int ExecuteNonQuery()

Returns

int

Number of affected records.

ExecuteNonQueryAsync(CancellationToken)

Executes query asynchronously and returns number of affected records.

Task<int> ExecuteNonQueryAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Asynchronous operation cancellation token.

Returns

Task<int>

Number of affected records.

ExecuteReader()

Executes query and returns data reader.

DataReaderWrapper ExecuteReader()

Returns

DataReaderWrapper

Data reader with query results.

ExecuteReaderAsync(CancellationToken)

Executes query asynchronously and returns data reader.

Task<IDataReaderAsync> ExecuteReaderAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Asynchronous operation cancellation token.

Returns

Task<IDataReaderAsync>

Data reader with query results.

ExecuteScalar()

Executes query and returns scalar value.

object? ExecuteScalar()

Returns

object

Scalar value.

ExecuteScalarAsync(CancellationToken)

Executes query asynchronously and returns scalar value.

Task<object?> ExecuteScalarAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Asynchronous operation cancellation token.

Returns

Task<object>

Scalar value.

GetSqlText()

Returns SQL text for query.

string GetSqlText()

Returns

string

Query SQL text.