Skip to main content
Dotmim.Sync is an open-source .NET library that syncs rows between a server database and client databases. The client app starts each sync session by calling SynchronizeAsync(). On SQL Server, Dotmim.Sync detects changes with SQL Server Change Tracking, or with its own triggers and tracking tables. Datasync Community Toolkit is part of the .NET Community Toolkit and was previously known as Azure Mobile Apps. Your ASP.NET Core API hosts its table controllers. The app uses an EF Core OfflineDbContext that stores data in SQLite and sends or fetches changes when the app calls PushAsync() or PullAsync(). PowerSync syncs data from your backend database into a SQLite database inside your app. The app reads and writes that local database directly, so it responds instantly and keeps working without a network connection. PowerSync syncs changes in both directions when the app is connected. On SQL Server, the PowerSync Service reads changes through Change Data Capture (CDC). All three tools also support other databases, as listed under Source Databases. This document compares them on SQL Server.
This comparison is accurate as of 2026-11-24, and is based on comparing Dotmim.Sync 1.3.0 and Datasync Community Toolkit 10.2.0 with PowerSync Service 1.28.3, and version 1.0.1 of the PowerSync .NET SDK (PowerSync.Common).
This document is based on each product’s documentation and source code, and on building the same SQL Server, ASP.NET Core, and .NET MAUI app with each of the three tools. See Migrating a SQL Server and .NET MAUI App to Offline-First for the PowerSync version of that app. The code for all three versions is linked under Companion Repo.

At a Glance

What Each Tool Includes

“Yes” means the tool does this with its documented setup.
“No” means it doesn’t, or you build it yourself.
The sections below explain each row in more detail.

How Server Changes Are Captured

All three tools pick up writes made directly with SQL, for example by a back-office system. PowerSync and Dotmim.Sync need no change to that system. With Datasync, that system must mark rows as deleted instead of deleting them.

PowerSync

The PowerSync Service reads changes from SQL Server through Change Data Capture (CDC). See Source Database Setup for the setup steps.

Dotmim.Sync

Dotmim.Sync’s SqlSyncChangeTrackingProvider uses SQL Server Change Tracking. Its other SQL Server provider, SqlSyncProvider, uses triggers and tracking tables instead.

Datasync Community Toolkit

Datasync tracks changes with metadata on each row, and the client pulls the rows whose UpdatedAt is later than the newest row it already has. See Azure SQL and SQL Server for the trigger that keeps UpdatedAt current. Datasync doesn’t send hard deletes to devices. To sync deletes, you enable soft delete and run a separate job to purge deleted rows. Every system that writes to the table must then set Deleted instead of running DELETE. A row removed with DELETE stays on devices that already have it.

How Data Is Stored on the Client

PowerSync

The PowerSync client SDK manages a SQLite database on the device. Your app queries it with SQL. Watch queries (also known as live queries) rerun when a local write or a sync changes a table that the query reads, so the UI updates without a manual reload.

Dotmim.Sync

Dotmim.Sync creates a SQLite database that mirrors the server tables on the first sync. Your app queries it with Microsoft.Data.Sqlite. Dotmim.Sync has no live queries, so your app queries again after each sync and each local write.

Datasync Community Toolkit

Datasync stores data in SQLite through EF Core, and your app queries the OfflineDbContext with LINQ. Your entities are typed classes on both the server and the client. Datasync has no live queries.

How Writes Work

All three tools save the user’s change locally first, so the app shows it immediately. They differ in where the change arrives on your server. If your existing backend API enforces business rules, either alternative needs the same rules again in its server hook. Each tool has its own detail to handle:
  • Dotmim.Sync: Uploads are idempotent upserts keyed by the row’s primary key, so a retried sync doesn’t create a duplicate row. Dotmim.Sync detects conflicts per row and resolves them with ServerWins by default. See Conflicts.
  • Datasync Community Toolkit: The queue doesn’t push operations in the order the changes were made. A parent change and a child change can arrive as separate requests, in the wrong order. Datasync has built-in optimistic concurrency: the server checks Version with If-Match, and you can configure ClientWinsConflictResolver, ServerWinsConflictResolver, or your own IConflictResolver. A retried create gets a 409 from the server. Without a conflict resolver, that operation stays failed.
  • PowerSync: Your backend API decides how to handle conflicts, so the logic lives in your own code. With the simplest API, the result is per-field last-write-wins, because each PATCH carries only the changed columns. A retry sends the whole transaction again, so your API must be safe to repeat. See Write Path Concepts and Handling Update Conflicts.

Rejected Writes and Stuck Queues

Sometimes your backend permanently refuses a write, for example because the write breaks a business rule. Any of the three tools can get stuck if the app treats a permanent rejection as a temporary error. The difference is what each tool does automatically, and what you must build to recover from errors.

PowerSync

You write the code in UploadData() that decides whether each response from your API is a permanent rejection or a temporary error. On a permanent rejection, it logs the error, records the reason, and calls complete() so the upload queue moves on. Your API implementation can also write the rejection error message to a table that syncs back to the client. After the upload queue is empty and the client has synced, the client SDK replaces the local data with the synced copy. The rejected change disappears from the device with no extra code. See How Changes Are Rolled Back.

Dotmim.Sync

Your server interceptor can reject a row in one of two ways:
  • Drop the row. The sync reports success, and no reason reaches the device. The rejected row stays in the device’s local database, because the server never stored it.
  • Throw an exception. The reason reaches the client in an HttpSyncWebException, but the server rolls back the whole sync. Every later sync fails in both directions until the server accepts the row.
To recover without stopping sync, drop the row and tell the device yourself, for example with a table of rejections that syncs down to each user. A sync with SyncType.ReinitializeWithUpload removes the rejected local rows, because it downloads all rows again. See Interceptors. For errors that the database raises while it applies a row, such as a constraint violation, see ErrorResolutionPolicy in Errors.

Datasync Community Toolkit

When the server rejects a pushed operation, PushAsync() reports it in PushResult.FailedRequests, and the operation stays in the queue as failed. Every later push sends it again. Datasync’s conflict resolvers run only for 409 and 412 version conflicts, so they don’t clear other rejections. PullAsync() refuses to pull any entity type that still has a queued operation, including a failed one:
As a result, one rejected write stops the device from receiving server changes for that table. This check is deliberate. See OfflineDbContext.PullAsync. A rejection can happen after the device was offline, or online when two devices update the same record. To recover, your app removes the rejected operation from DatasyncOperationsQueue, undoes the local change itself, and pulls again. The library doesn’t keep the previous value. The docs’ Re-synchronizing All Data recipe does this for a whole table, which also discards the user’s other unsynced changes. See also the maintainer’s guidance in issue #248.

When Data Syncs

All three tools support offline reads and writes, and keep pending writes across app restarts.

PowerSync

While the app is connected, the PowerSync Service streams changes to it, and the app doesn’t need to do anything. This includes writes made directly with SQL, which CDC captures. If the app gets disconnected, the client SDK uploads queued writes automatically when the connection returns.

Dotmim.Sync and Datasync

Dotmim.Sync and Datasync don’t push changes to the device. A sync reads SQL Server directly, so it returns current data with no replication delay. The device sees server changes only when the app syncs, for example at startup, on pull-to-refresh, or when a page opens. Datasync’s real-time tutorial sends SignalR messages from PostCommitHookAsync. That hook runs only for writes through the table controllers, not for writes made directly with SQL. In both Dotmim.Sync and Datasync, queued writes upload only when the app syncs.

Auth and Per-User Data

PowerSync

PowerSync clients connect with a JWT. Sync Streams use claims from the token (such as the user’s ID), as well as other parameters, to choose the rows each client receives. When a row leaves a user’s streams, for example because the user loses access, the client SDK removes it from the device. Your backend authorizes writes when UploadData() sends them. If your API or authentication provider already issues RS256 tokens and publishes a JWKS, the PowerSync Service can verify the same tokens. See Authentication.

Dotmim.Sync

Dotmim.Sync’s sync endpoint is a normal controller in your API, protected with [Authorize]. See Web Security. Per-user rows come from setup filters with parameters, such as a user ID.
The client sends Dotmim.Sync’s filter parameters. Set them on the server from the token in an interceptor, such as OnHttpGettingRequest, and always overwrite the value that the client sent. Otherwise, a client can request another user’s rows by sending that user’s ID.
Filters don’t apply to uploads, so your interceptor also checks that the user owns each uploaded row.

Datasync Community Toolkit

Datasync’s table controllers use [Authorize]. IAccessControlProvider.GetDataView() limits which rows a user can read. IsAuthorizedAsync() and PreCommitHookAsync() control writes. See Configure Access Permissions. On the client, Datasync’s GenericAuthenticationProvider gets a new token only when the cached one is near expiry. A 401 response doesn’t trigger a new token. If you rotate your signing key, each sync fails until the cached token nears expiry or the app calls LoginAsync().

Schema Changes

Adding a nullable column to a synced table takes different steps in each tool.

PowerSync

You run ALTER TABLE, add a new CDC capture instance for the table, and redeploy your Sync Config. The redeploy reprocesses the data, and the previous deployment serves clients until the new one is active. Installed apps keep syncing in both directions, because by default, the client-side schema is a SQLite view over schemaless data (note that PowerSync also supports Raw Tables and Managed Tables that do not use views over schemaless data). You can change the server before or after the app release. To use the column, the app adds it to its client-side schema. See Implementing Schema Changes.

Dotmim.Sync

You re-provision the server scope in code. After that, apps that haven’t upgraded can still download changes, but can’t upload them. Writes made on those devices don’t reach the server until the user installs the new app version. The Provision docs say that each client must migrate its local schema and re-provision. An app release must therefore reach devices before you change the server. Alternatively, you can use a new scope for each schema version.

Datasync Community Toolkit

On the server, a schema change takes three steps: ALTER TABLE, add the property, and redeploy. On the device, EnsureCreated(), which the Datasync samples use, doesn’t change an existing database, and the Datasync docs have no guidance on client migrations. An upgraded app fails with no such column errors until it uses EF Core migrations. Rows that the device pulled before the change get the new column only when they change again on the server.

Requirements and Infrastructure

Platforms, Source Databases, Hosting, and Licensing

Client Platforms

PowerSync statuses come from Feature Status. See Supported Platforms for minimum versions. Dotmim.Sync and Datasync have client libraries only for .NET. PowerSync supports a wide range of client SDKs. If your team supports apps built with multiple stacks, PowerSync syncs the same data in each environment with the same Sync Streams.

Source Databases

Hosting and Licensing

Companion Repo: Demo App

The companion repo features a delivery driver demo app implemented in 4 different ways for comparison purposes:
  1. Regular REST API based app with no sync or offline capabilities (main branch)
  2. PowerSync version. Compare to baseline
  3. Dotmim.Sync version Compare to baseline
  4. Datasync Commmunity Toolkit version. Compare to baseline
The branches don’t add the exact same features, since the added functionality is based on the capabilities supported by each tool. The Dotmim.Sync and Datasync branches leave out what this document lists as things you build yourself, such as getting server changes to the device without user action and recovering from rejected writes.

Learn More