RetrieveDataFromDatabases<T>(IDatabase, IDatabase, string, List<string>, PropertyEqualityComparer<T>, FilterCallback<T>, HashSet<T>, HashSet<T>) Method
Retrieves data from source and destination databases for a specified table and column list, using a specified data contract type.
Namespace
DbSyncKit.DB.Fetcher
Containing Type
DataContractFetcher

Syntax

public void RetrieveDataFromDatabases<T>(IDatabase source, IDatabase destination, string tableName, List<string> ColumnList, PropertyEqualityComparer<T> ComparablePropertyEqualityComparer, FilterCallback<T> filterCallback, out HashSet<T> sourceList, out HashSet<T> destinationList)

Remarks

The method uses a QueryGenerationManager to generate queries for retrieving data based on the specified table and columns. If the providers of the source and destination databases differ, a new QueryGenerationManager is created for the destination database. The retrieved data can be optionally filtered using the provided filter callback function.

Type Parameters

Name Description
T The type of data entities to retrieve.

Parameters

Name Type Description
source IDatabase The source database.
destination IDatabase The destination database.
tableName string The name of the table from which to retrieve data.
ColumnList List<string> A list of column names to retrieve from the table.
ComparablePropertyEqualityComparer PropertyEqualityComparer<T> An equality comparer for identifying properties used in data comparison.
filterCallback FilterCallback<T> A callback function for filtering the retrieved data.
sourceList HashSet<T> An output parameter that receives the retrieved data from the source database.
destinationList HashSet<T> An output parameter that receives the retrieved data from the destination database.