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

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

Returns a primary key of the given entity.

Namespace: DevExpress.Mvvm.DataModel

Assembly: DevExpress.Mvvm.v19.1.DataModel.dll

Declaration

public static TPrimaryKey GetProjectionPrimaryKey<TEntity, TProjection, TPrimaryKey>(
    this IRepository<TEntity, TPrimaryKey> repository,
    TProjection projectionEntity
)
    where TEntity : class

Parameters

Name Type Description
repository IRepository<TEntity, TPrimaryKey>

A repository.

projectionEntity TProjection

An entity.

Type Parameters

Name
TEntity
TProjection
TPrimaryKey

Returns

Type Description
TPrimaryKey

The primary key of the given entity.

See Also