Method to allow comparison of detached query in Lambda expression e.g., p => p.Name == myQuery.As<string>

Namespace: NHibernate.Criterion
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
public S As<S>()
Visual Basic
Public Function As(Of S) As S
Visual C++
public:
generic<typename S>
S As()

Type Parameters

S
type returned (projected) by query

Return Value

throws an exception if evaluated directly at runtime.

See Also