IdeaBlade DevForce 2010 Help Reference
ProjectionSelector Constructor(String,IProjectionSelector,String)
See Also  Example Send Feedback
IdeaBlade.Linq Assembly > IdeaBlade.Linq Namespace > ProjectionSelector Class > ProjectionSelector Constructor : ProjectionSelector Constructor(String,IProjectionSelector,String)



methodName
Any Enumerable method that takes either a predicate or a projection expression. InstanceType must be an IEnumerable.
projection
alias
Create a ProjectionSelector from the specified method name and projection selector.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal methodName As String, _
   ByVal projection As IProjectionSelector, _
   Optional ByVal alias As String _
)
Visual Basic (Usage)Copy Code
Dim methodName As String
Dim projection As IProjectionSelector
Dim alias As String
 
Dim instance As New ProjectionSelector(methodName, projection, alias)
C# 
public ProjectionSelector( 
   string methodName,
   IProjectionSelector projection,
   string alias
)
C++/CLI 
public:
ProjectionSelector( 
   String^ methodName,
   IProjectionSelector^ projection,
   String^ alias
)

Parameters

methodName
Any Enumerable method that takes either a predicate or a projection expression. InstanceType must be an IEnumerable.
projection
alias

Example

C#Copy Code
public void DynamicGroupAndSum() {
  var query = EntityQuery.Create(typeof(Order), manager)
    .GroupBy(new ProjectionSelector("ShipCity"))
    .Select(
          new ProjectionSelector("Key", "ShipCity").Combine(
          new ProjectionSelector("Select", new ProjectionSelector("Freight")).Dot("Sum()").WithAlias("Sum")
    ));
  var list = query.Execute();
}

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.