ExpressionHelper.GetEntityTraits<TOwner, TPropertyOwner, TProperty>(TOwner, Expression<Func<TPropertyOwner, TProperty>>) Method

Returns an instance of the EntityTraits class that encapsulates operations to obtain and set the primary key value of a given entity.

Namespace: DevExpress.Mvvm.Utils

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

Declaration

public static EntityTraits<TPropertyOwner, TProperty> GetEntityTraits<TOwner, TPropertyOwner, TProperty>(
    TOwner owner,
    Expression<Func<TPropertyOwner, TProperty>> getPropertyExpression
)

Parameters

Name Type Description
owner TOwner

An instance of the TOwner type which type is used as a key to cache compiled lambda expressions.A lambda expression that returns the primary key value for a given entity.

getPropertyExpression Expression<Func<TPropertyOwner, TProperty>>

A lambda expression that returns the primary key value for a given entity.

Type Parameters

Name
TOwner
TPropertyOwner
TProperty

Returns

Type
EntityTraits<TPropertyOwner, TProperty>
See Also