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 | |
---|---|---|
BuildDeleteStatement | Creates and returns a DELETE command for the current table that includes the DELETE and FROM clauses. | |
BuildDeleteStatementForEntity | Creates and returns a DELETE command for the specified entity. | |
BuildDeleteStatementForKey | Creates and returns a DELETE command for the entity whose primary key matches the id parameter. | |
BuildInsertStatementForEntity | Creates and returns an INSERT command for the specified entity. | |
BuildSelectClause() | Creates and returns a SELECT query for the current table that includes the SELECT clause only. | |
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. | |
BuildSelectStatement() | Creates and returns a SELECT query for the current table that includes the SELECT and FROM clauses. | |
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. | |
BuildUpdateClause | Creates and returns an UPDATE command for the current table that includes the UPDATE clause. | |
BuildUpdateStatementForEntity(TEntity) | Creates and returns an UPDATE command for the specified entity. | |
BuildUpdateStatementForEntity(TEntity, Object) | Creates and returns an UPDATE command for the specified entity. |