EntityTraits(Func<TEntity, TPrimaryKey>, Action<TEntity, TPrimaryKey>, Func<TEntity, Boolean>) Constructor

Initializes a new instance of the EntityTraits<TEntity, TPrimaryKey> class.

Namespace: DevExpress.Mvvm.Utils

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

Declaration

public EntityTraits(
    Func<TEntity, TPrimaryKey> getPrimaryKeyFunction,
    Action<TEntity, TPrimaryKey> setPrimaryKeyAction,
    Func<TEntity, bool> hasPrimaryKeyFunction
)
Public Sub New(
    getPrimaryKeyFunction As Func(Of TEntity, TPrimaryKey),
    setPrimaryKeyAction As Action(Of TEntity, TPrimaryKey),
    hasPrimaryKeyFunction As Func(Of TEntity, Boolean)
)

Parameters

Name Type Description
getPrimaryKeyFunction Func<TEntity, TPrimaryKey>

A function that returns the primary key value of a given entity.

setPrimaryKeyAction Action<TEntity, TPrimaryKey>

An action that assigns the primary key value to a given entity.

hasPrimaryKeyFunction Func<TEntity, Boolean>

A function that determines whether given the entity has a primary key assigned.

See Also