Skip to main content

IRepository<TEntity, TPrimaryKey>.SetPrimaryKey(TEntity, TPrimaryKey) Method

Assigns the given primary key value to a given entity.

Namespace: DevExpress.Mvvm.DataModel

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

NuGet Package: DevExpress.Scaffolding.Core

Declaration

void SetPrimaryKey(
    TEntity entity,
    TPrimaryKey primaryKey
)

Parameters

Name Type Description
entity TEntity

An entity to which to assign the primary key value.

primaryKey TPrimaryKey

A primary key value.

See Also