Example Code for Reporting and Resolving Constraint Conflicts

The following example program implements a provider that handles constraint conflicts. The provider detects collision constraint conflicts when an item is created in its SaveChangeWithChangeUnits(ItemChange, SaveChangeWithChangeUnitsContext) method. When a collision constraint is detected, the provider reports the conflict to the change applier by using RecordConstraintConflictForItem(SyncId, ConstraintConflictReason). The provider handles the resolution of collision constraint conflicts in its SaveChangeWithChangeUnits(ItemChange, SaveChangeWithChangeUnitsContext) method as well.

This example program is described in detail in How to: Report and Resolve Constraint Conflicts.

Vea también

Conceptos

How to: Report and Resolve Constraint Conflicts