SyncData<T>(IDatabase, IDatabase, FilterCallback<T>, Direction) Method
Synchronizes data of a specific type between source and destination databases.
Namespace
DbSyncKit.Core
Containing Type
Synchronization

Syntax

public Result<T> SyncData<T>(IDatabase source, IDatabase destination, FilterCallback<T> filterDataCallback, Direction direction = SourceToDestination)

Remarks

This method synchronizes data between source and destination databases of a specific type. It retrieves data from both databases, applies optional filtering using the provided callback function, and then compares the data to identify differences. The direction of synchronization determines the comparison direction between source and destination databases.

Type Parameters

Name Description
T The type of data entities to synchronize.

Parameters

Name Type Description
source IDatabase The source database.
destination IDatabase The destination database.
filterDataCallback FilterCallback<T> A callback function for filtering data before synchronization.
direction Direction Specifies the direction of synchronization. Default is SourceToDestination.

Return Value

Type Description
Result<T> A result object containing the differences between source and destination data.