DevForce Help Reference
ProjectionSelector Constructor(String,IProjectionSelector,String)
Example 


Any Enumerable method that takes either a predicate or a projection expression. InstanceType must be an IEnumerable.
Create a ProjectionSelector from the specified method name and projection selector.
Syntax
'Declaration
 
Public Function New( _
   ByVal methodName As String, _
   ByVal projection As IProjectionSelector, _
   Optional ByVal alias As String _
)
'Usage
 
Dim methodName As String
Dim projection As IProjectionSelector
Dim alias As String
 
Dim instance As New ProjectionSelector(methodName, projection, alias)
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
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 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ProjectionSelector Class
ProjectionSelector Members
Overload List

Send Feedback