Table of Contents

Class QueryBuilderExtensions

Namespace
FluentCommand
Assembly
FluentCommand.dll

Provides extension methods for building SQL queries using a QueryBuilder within a data session.

public static class QueryBuilderExtensions
Inheritance
QueryBuilderExtensions
Inherited Members

Methods

Sql(IDataSession, Action<QueryBuilder>)

Configures and sets the SQL command for the specified IDataSession using a fluent QueryBuilder.

public static IDataCommand Sql(this IDataSession dataSession, Action<QueryBuilder> builder)

Parameters

dataSession IDataSession

The data session used to execute the query.

builder Action<QueryBuilder>

An action that configures the QueryBuilder to build the desired SQL statement and parameters.

Returns

IDataCommand

An IDataCommand representing the configured SQL command, ready for execution or further configuration.

Remarks

This method creates a new QueryBuilder using the session's IQueryGenerator and a fresh parameter list. The builder action is invoked to configure the query. The resulting SQL and parameters are then applied to the session's data command.