Create an alias for a projection

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

Syntax

C#
public static IProjection WithAlias(
	this IProjection projection,
	Expression<Func<Object>> alias
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function WithAlias ( _
	projection As IProjection, _
	alias As Expression(Of Func(Of Object)) _
) As IProjection
Visual C++
[ExtensionAttribute]
public:
static IProjection^ WithAlias(
	IProjection^ projection, 
	Expression<Func<Object^>^>^ alias
)

Parameters

projection
Type: NHibernate.Criterion..::..IProjection
the projection instance
alias
Type: System.Linq.Expressions..::..Expression<(Of <(<'Func<(Of <(<'Object>)>)>>)>)>
LambdaExpression returning an alias

Return Value

return NHibernate.Criterion.IProjection

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IProjection. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also