The following functionality is available when working with expressions. The normal operator overloaded functionality is available by default, e.g. entitynameFields.Field operator entitynameFields.OtherField. Additionally expression operator methods have been added to combine expressions easier, in the form of extension methods like .Mul(), .Add() etc..

These methods are defined on expression and field classes. Please consult the LLBLGen Pro runtime reference manual, Queryspec assembly for the various extension methods available to you. They're defined in the classes ExpressionExtensionMethods and FieldExtensionMethods.

Aliasing in projections

To specify an alias for an expression in projections, use the .As(string) extension method. This aliases the expression specified.

Specifying type for fields and expressions in projections

To specify the resulttype for an expression in a projection, use .CastTo<TResult>() extension method. This extension method will specify the TResult type as the result type of the expression. This is used when projecting to a construct which is created by the query engine.

To specify the type of a field which is created using the Field() method of the QueryFactory, one also can use the CastTo<type>() method.