Skip to main content
A newer version of this page is available. .

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.v19.1.DataModel.dll

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