Class DbQuery<TParams>
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
Represents a DbQuery that declared the type of its values.
public sealed class DbQuery<TParams> where TParams : struct, IEquatable<TParams>
Type Parameters
TParamsThe type of the values: a struct whose public properties and fields are the parameters.
- Inheritance
-
DbQuery<TParams>
- Inherited Members
Methods
- AsDictionaryRows()
Reads each row without a model, as a DictionaryRow, and returns the mapped definition.
- AsObjectArrays()
Reads each row without a model, as an array of its values, and returns the mapped definition.
- Map<T>()
Maps each row to a
Tby column name, and returns the mapped definition.
- Map<T>(RowMap<T>?)
Maps each row to a
Twith a map the caller declared, and returns the mapped definition.
- Map<T>(Func<IDataRecord, T>)
Maps each row with a selector, and returns the mapped definition.
- Scalar<T>()
Reads one value, the first column of the first row, as a
T, and returns the scalar definition.
- Using(DbConnection)
Binds the query to a connection. The connection is opened late and closed again only if this call opened it; it is never disposed.
- Using(DbTransaction)
Binds the query to a transaction, which runs it on the transaction's connection.
- Using<TConnection>(IDbConnectionFactory<TConnection>)
Binds the query to a factory: each run creates a connection, opens it, and disposes it when finished.
- Using<TConnection>(IDbConnectionPool<TConnection>)
Binds the query to a pool: each run takes a connection, opens it if needed, and gives it back.