using Dotmim.Sync.SqlServer;
using Dotmim.Sync.Sqlite;
using Microsoft.Data.Sqlite;
using System.Threading.Tasks;
public static async Task Main()
await SynchronizeAsync();
await QueryClientDatabaseAsync();
private static async Task SynchronizeAsync()
var serverProvider = new SqlSyncProvider(FiddleHelper.GetConnectionStringSqlServerNorthwind());
var clientProvider = new SqliteSyncProvider("northwind.db");
var agent = new SyncAgent(clientProvider, serverProvider, new string[] {"Customers", "Products", "Orders", "Order Details"});
var result = await agent.SynchronizeAsync();
Console.WriteLine(result);
private static async Task QueryClientDatabaseAsync()
Console.WriteLine("-------------------");
using (var sqliteConnection = new SqliteConnection("Data Source=northwind.db"))
using (var sqlCommand = new SqliteCommand("Select * from Customers", sqliteConnection))
await sqliteConnection.OpenAsync();
var reader = await sqlCommand.ExecuteReaderAsync();
Console.WriteLine($"{reader.GetString(2)}:\t{reader.GetString(3)}");
sqliteConnection.Close();