Class VariantMustDeclareKeyProperty

Namespace
Cratis.Chronicle.Projections
Assembly
Cratis.Chronicle.dll

The exception that is thrown when a model-bound variant does not declare a KeyAttribute on any property or primary constructor parameter.

public class VariantMustDeclareKeyProperty : Exception, ISerializable
Inheritance
VariantMustDeclareKeyProperty
Implements
Inherited Members
Extension Methods

Remarks

The key is what correlates an update-only handler back to an already-active instance of the variant, so a variant without one has no way to be updated after it is created.

Constructors

VariantMustDeclareKeyProperty(Type)

The exception that is thrown when a model-bound variant does not declare a KeyAttribute on any property or primary constructor parameter.

public VariantMustDeclareKeyProperty(Type modelType)

Parameters

modelType Type

The variant type that is missing the KeyAttribute.

Remarks

The key is what correlates an update-only handler back to an already-active instance of the variant, so a variant without one has no way to be updated after it is created.