NoPrimaryKeyOrUniqueFieldsException ClassNemiro.Data.dll
An exception occurs if the class could not find any properties with flags PrimaryKey or Unique.
Inheritance Hierarchy

System Object
  System Exception
    Nemiro.Data NoPrimaryKeyOrUniqueFieldsException

Namespace: Nemiro.Data
Assembly: Nemiro.Data (in Nemiro.Data.dll) Version: 2.11.4.126 (2.11.4.126)
Syntax

public class NoPrimaryKeyOrUniqueFieldsException : Exception

The NoPrimaryKeyOrUniqueFieldsException type exposes the following members.

Constructors

  NameDescription
Public methodNoPrimaryKeyOrUniqueFieldsException
Initializes a new instance of the NoPrimaryKeyOrUniqueFieldsException class.
Top
Methods

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetBaseException (Inherited from Exception.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetObjectData (Inherited from Exception.)
Public methodGetType (Inherited from Exception.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Exception.)
Top
Properties

  NameDescription
Public propertyData (Inherited from Exception.)
Public propertyHelpLink (Inherited from Exception.)
Protected propertyHResult (Inherited from Exception.)
Public propertyInnerException (Inherited from Exception.)
Public propertyMessage (Inherited from Exception.)
Public propertySource (Inherited from Exception.)
Public propertyStackTrace (Inherited from Exception.)
Public propertyTargetSite (Inherited from Exception.)
Top
Events

  NameDescription
Protected eventSerializeObjectState (Inherited from Exception.)
Top
Remarks

This exception can occur in the methods of working with data in ORM classes.

To fix the error, add at least one attribute ColumnAttribute with flags PrimaryKey or Unique.

See Also