SqlCommandBuilder<TEntity> Class

Generates SQL commands for annotated classes. This class cannot be instantiated, to get an instance use the CommandBuilder or CommandBuilder properties.

Inheritance Hierarchy

System.Object
  DbExtensions.SqlCommandBuilder<TEntity>

Namespace:  DbExtensions
Assembly: DbExtensions.dll

Syntax

public sealed class SqlCommandBuilder<TEntity>
where TEntity : class

Type Parameters

TEntity

The type of the entity to generate commands for.

The SqlCommandBuilder<TEntity> type exposes the following members.

Methods

  Name Description
Public method BuildDeleteStatement Creates and returns a DELETE command for the current table that includes the DELETE and FROM clauses.
Public method BuildDeleteStatementForEntity Creates and returns a DELETE command for the specified entity.
Public method BuildDeleteStatementForKey Creates and returns a DELETE command for the entity whose primary key matches the id parameter.
Public method BuildInsertStatementForEntity Creates and returns an INSERT command for the specified entity.
Public method BuildSelectClause() Creates and returns a SELECT query for the current table that includes the SELECT clause only.
Public method BuildSelectClause(String) Creates and returns a SELECT query for the current table that includes the SELECT clause only. All column names are qualified with the provided tableAlias.
Public method BuildSelectStatement() Creates and returns a SELECT query for the current table that includes the SELECT and FROM clauses.
Public method BuildSelectStatement(String) Creates and returns a SELECT query for the current table that includes the SELECT and FROM clauses. All column names are qualified with the provided tableAlias.
Public method BuildUpdateClause Creates and returns an UPDATE command for the current table that includes the UPDATE clause.
Public method BuildUpdateStatementForEntity(TEntity) Creates and returns an UPDATE command for the specified entity.
Public method BuildUpdateStatementForEntity(TEntity, Object) Creates and returns an UPDATE command for the specified entity.

See Also

Reference

DbExtensions Namespace

© Max Toro Q.