Table of Contents

Class KEFCoreComplexTypeEquatableConvention

Namespace
MASES.EntityFrameworkCore.KNet.Metadata.Conventions
Assembly
MASES.EntityFrameworkCore.KNet.dll

A convention that verifies all complex types in the model implement value equality, either via IEquatable<T> or by overriding Equals(object).

public class KEFCoreComplexTypeEquatableConvention : IModelFinalizingConvention, IConvention
Inheritance
KEFCoreComplexTypeEquatableConvention
Implements
Inherited Members

Remarks

KEFCore relies on value equality for complex types to correctly detect changes and serialize data to Kafka topics. Reference equality (the default .NET behavior) would cause incorrect change tracking and data loss.

To suppress this check for a specific complex type, apply KEFCoreIgnoreEquatableCheckAttribute to the class.

Methods

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called when a model is being finalized.

public void ProcessModelFinalizing(IConventionModelBuilder modelBuilder, IConventionContext<IConventionModelBuilder> context)

Parameters

modelBuilder IConventionModelBuilder

The builder for the model.

context IConventionContext<IConventionModelBuilder>

Additional information associated with convention execution.