Skip to main content

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.v24.2.DataModel.dll

NuGet Package: DevExpress.Scaffolding.Core

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