DbExpressionBuilder.Select<TProjection> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new DbProjectExpression that selects the specified expression over the given input set.
public static System.Data.Entity.Core.Common.CommandTrees.DbProjectExpression Select<TProjection> (this System.Data.Entity.Core.Common.CommandTrees.DbExpression source, Func<System.Data.Entity.Core.Common.CommandTrees.DbExpression,TProjection> projection);
static member Select : System.Data.Entity.Core.Common.CommandTrees.DbExpression * Func<System.Data.Entity.Core.Common.CommandTrees.DbExpression, 'Projection> -> System.Data.Entity.Core.Common.CommandTrees.DbProjectExpression
<Extension()>
Public Function Select(Of TProjection) (source As DbExpression, projection As Func(Of DbExpression, TProjection)) As DbProjectExpression
Type Parameters
- TProjection
The method result type of projection.
Parameters
- source
- DbExpression
An expression that specifies the input set.
- projection
- Func<DbExpression,TProjection>
A method that specifies how to derive the projected expression given a member of the input set. This method must produce an instance of a type that is compatible with Select and can be resolved into a DbExpression . Compatibility requirements for TProjection are described in remarks.
Returns
A new DbProjectExpression that represents the select operation.
Exceptions
The result of projection is null.
Applies to
Entity Framework