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

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

Assigns the given primary key value to a given entity.

Namespace: DevExpress.Mvvm.DataModel

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

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