Compares two sets of data entities and identifies the added, deleted, and edited entries.
- Namespace
- DbSyncKit
.Core .Helper - Containing Type
- Data
Contract Mismatch Identifier
Syntax
public Result<T> GetDifferences<T>(HashSet<T> sourceList, HashSet<T> destinationList, PropertyEqualityComparer<T> keyComparer, PropertyEqualityComparer<T> CompariablePropertyComparer, bool DetailedComparison = true)Type Parameters
| Name | Description |
|---|---|
| T |
Parameters
| Name | Type | Description |
|---|---|---|
| sourceList | HashSet |
The source set of data entities. |
| destinationList | HashSet |
The destination set of data entities. |
| keyComparer | Property |
An equality comparer for identifying key properties. |
| CompariablePropertyComparer | Property |
An equality comparer for identifying properties used in the comparison. |
| DetailedComparison | bool | Specifies whether to include detailed comparison results for each property change. Default is true. |
Return Value
| Type | Description |
|---|---|
| Result |
A object containing the added, deleted, and edited entries. For detailed comparisons, it includes information about individual property changes in the property; otherwise, edited entries are listed in the property. |