Skip to main content

RepositoryExtensions.GetProjectionPrimaryKeyEqualsExpression<TEntity, TProjection, TPrimaryKey>(IRepository<TEntity, TPrimaryKey>, TPrimaryKey) Method

Builds a lambda expression that compares an entity primary key with the given constant value.

Namespace: DevExpress.Mvvm.DataModel

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

NuGet Package: DevExpress.Scaffolding.Core

Declaration

public static Expression<Func<TProjection, bool>> GetProjectionPrimaryKeyEqualsExpression<TEntity, TProjection, TPrimaryKey>(
    this IRepository<TEntity, TPrimaryKey> repository,
    TPrimaryKey primaryKey
)
    where TEntity : class

Parameters

Name Type Description
repository IRepository<TEntity, TPrimaryKey>

A repository.

primaryKey TPrimaryKey

A value to compare with the entity primary key.

Type Parameters

Name
TEntity
TProjection
TPrimaryKey

Returns

Type Description
Expression<Func<TProjection, Boolean>>

The lambda expression.

See Also