Back to Devexpress

DuplicateKeyPropertyException Class

xpo-devexpress-dot-xpo-dot-exceptions-1554142e.md

latest1.5 KB
Original Source

DuplicateKeyPropertyException Class

An exception that is thrown when a persistent object has two or more key properties.

Namespace : DevExpress.Xpo.Exceptions

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

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

Remarks

This exception is thrown whenever a class with multiple key property definitions is used.

Solution:

  • declare only one key property in a persistent object;

  • for classes derived from the XPObject class do not declare key properties, as the XPObject already contains the XPObject.Oid key property.

Inheritance

Object Exception DuplicateKeyPropertyException

See Also

DuplicateKeyPropertyException Members

KeyAttribute

DevExpress.Xpo.Exceptions Namespace