Skip to main content

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

Creates an IQuerable representing a sequence of entities from a repository filtered by a given predicate and projected to a specified projection entity type by a given LINQ function.

Namespace: DevExpress.Mvvm.DataModel

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

Declaration

public static IQueryable<TProjection> GetFilteredEntities<TEntity, TProjection>(
    this IReadOnlyRepository<TEntity> repository,
    Expression<Func<TEntity, bool>> predicate,
    Func<IRepositoryQuery<TEntity>, IQueryable<TProjection>> projection
)
    where TEntity : class

Parameters

Name Type Description
repository IReadOnlyRepository<TEntity>

A repository.

predicate Expression<Func<TEntity, Boolean>>

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

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

Type Parameters

Name
TEntity
TProjection

Returns

Type
IQueryable<TProjection>
See Also