Skip to main content

ReadOnlyRepositoryExtensions.AppendToProjection<TEntity, TProjection>(Expression<Func<TEntity, Boolean>>, Func<IRepositoryQuery<TEntity>, IQueryable<TProjection>>) Method

Combines an initial projection and a predicate into a new projection with the effect of both.

Namespace: DevExpress.Mvvm.DataModel

Assembly: DevExpress.Mvvm.v23.2.DataModel.dll

NuGet Package: DevExpress.Scaffolding.Core

Declaration

public static Func<IRepositoryQuery<TEntity>, IQueryable<TProjection>> AppendToProjection<TEntity, TProjection>(
    Expression<Func<TEntity, bool>> predicate,
    Func<IRepositoryQuery<TEntity>, IQueryable<TProjection>> projection
)
    where TEntity : class

Parameters

Name Type Description
predicate Expression<Func<TEntity, Boolean>>

A function to test each element for a condition.

projection Func<IRepositoryQuery<TEntity>, IQueryable<TProjection>>

A LINQ function used to transform entities from repository entity type to projection entity type.

Type Parameters

Name
TEntity
TProjection

Returns

Type Description
Func<IRepositoryQuery<TEntity>, IQueryable<TProjection>>

A new projection.

See Also