Skip to content

EntitySqlQueryExtensions class

namespace: Serenity.Data   assembly: Serenity.Net.Services

Extensions for SqlQuery related to entities.

public static class EntitySqlQueryExtensions

Public Members

name description
static From(…) Adds row fields as a FROM source and applies their dialect when the query dialect is not overridden. (2 methods)
static From<TFields>(…) Adds fields as a FROM source, adjusting the default T0 alias when it is already used. This overload does not set an INTO target. (5 methods)
static GroupBy(…) Adds a field's expression to the group by list. (2 methods)
static InnerJoin<TFields>(…) Adds an INNER JOIN using fields aliased for this query and builds its ON criteria from those fields.
static InnerJoinVia<TFields>(…) Adds an INNER JOIN to the row referenced by the foreign key field.
static Into(…) Adds the specified entity to the INTO list of the query, and sets it as the current INTO row.
static IntoForeignRow<TFields>(…) Selects fields from an already joined foreign row into a row-valued property.
static LeftJoin<TFields>(…) Adds a LEFT JOIN using fields aliased for this query and builds its ON criteria from those fields.
static LeftJoinVia<TFields>(…) Adds a LEFT JOIN to the row referenced by the foreign key field.
static OrderBy(…) Adds a field's expression to the order by list. (2 methods)
static RightJoin<TFields>(…) Adds a RIGHT JOIN using fields aliased for this query and builds its ON criteria from those fields.
static RightJoinVia<TFields>(…) Adds a RIGHT JOIN to the row referenced by the foreign key field.
static Select(…) Adds a field's expression to the SELECT statement with its own column name. If a join alias is referenced in the field expression, and the join is defined in the field's entity class, it is automatically included in the query. The field is marked as a target at the current index for future loading from a data reader. (5 methods)
static SelectAs(…) Adds a field or an expression to the SELECT statement with a column name of a field's name. The field is marked as a target at the current index for future loading from a data reader.
static SubQueryFrom<TFields>(…) Creates a subquery and adds the specified fields as its FROM source without setting an INTO target. If the fields use the default T0 alias, an available alias is allocated from the query tree.
static WithSelf<TQuery>(…) Returns the query and assigns the same instance to a reference for use within a fluent chain.

See Also