Back to Devexpress

KeyPropertyAbsentException Class

xpo-devexpress-dot-xpo-dot-exceptions-13e0b778.md

latest1.4 KB
Original Source

KeyPropertyAbsentException Class

An exception that is thrown when a persistent object doesn’t have a key.

Namespace : DevExpress.Xpo.Exceptions

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public class KeyPropertyAbsentException :
    Exception
vb
Public Class KeyPropertyAbsentException
    Inherits Exception

Remarks

Each object must have a key property. This exception is thrown if an object doesn’t have a key.

Solution:

  • add a key field to the object (by deriving the object class from the XPObject class or by declaring a property with the KeyAttribute attribute).

Inheritance

Object Exception KeyPropertyAbsentException

See Also

KeyPropertyAbsentException Members

DevExpress.Xpo.Exceptions Namespace