SDK reference for using PowerSync in .NET clients.
This SDK is distributed via NuGet [External link].
Refer to the powersync-dotnet repo on GitHub.
A full API Reference for this SDK is not yet available. This is planned for a future release.
Gallery of .NET example projects/demo apps built with PowerSync.
This SDK is currently in an alpha release. It is not suitable for production use as breaking changes may still occur.
The PowerSync .NET SDK supports:
Current Limitations:
For more details, please refer to the package README.
For desktop/server/binary use-cases and WPF, add the PowerSync.Common
NuGet package to your project:
For desktop/server/binary use-cases and WPF, add the PowerSync.Common
NuGet package to your project:
For MAUI apps, add both PowerSync.Common
and PowerSync.Maui
NuGet packages to your project:
Add --prerelease
while this package is in alpha.
Next, make sure that you have:
The first step is defining the schema for the local SQLite database.
This schema represents a “view” of the downloaded data. No migrations are required — the schema is applied directly when the local PowerSync database is constructed (as we’ll show in the next step). You can use this example as a reference when defining your schema.
Next, you need to instantiate the PowerSync database — this is the core managed database.
Its primary functions are to record all changes in the local database, whether online or offline. In addition, it automatically uploads changes to your app backend when connected.
Example:
The initialization syntax differs slightly between the Common and MAUI SDKs:
The PowerSync backend connector provides the connection between your application backend and the PowerSync client-side managed SQLite database.
It is used to:
Accordingly, the connector must implement two methods:
Example:
With your database instantiated and your connector ready, call connect
to start the synchronization process:
After connecting the client database, it is ready to be used. You can run queries and make updates as follows:
Enable logging to help you debug your app. By default, the SDK uses a no-op logger that doesn’t output any logs. To enable logging, you can configure a custom logger using .NET’s ILogger
interface:
SDK reference for using PowerSync in .NET clients.
This SDK is distributed via NuGet [External link].
Refer to the powersync-dotnet repo on GitHub.
A full API Reference for this SDK is not yet available. This is planned for a future release.
Gallery of .NET example projects/demo apps built with PowerSync.
This SDK is currently in an alpha release. It is not suitable for production use as breaking changes may still occur.
The PowerSync .NET SDK supports:
Current Limitations:
For more details, please refer to the package README.
For desktop/server/binary use-cases and WPF, add the PowerSync.Common
NuGet package to your project:
For desktop/server/binary use-cases and WPF, add the PowerSync.Common
NuGet package to your project:
For MAUI apps, add both PowerSync.Common
and PowerSync.Maui
NuGet packages to your project:
Add --prerelease
while this package is in alpha.
Next, make sure that you have:
The first step is defining the schema for the local SQLite database.
This schema represents a “view” of the downloaded data. No migrations are required — the schema is applied directly when the local PowerSync database is constructed (as we’ll show in the next step). You can use this example as a reference when defining your schema.
Next, you need to instantiate the PowerSync database — this is the core managed database.
Its primary functions are to record all changes in the local database, whether online or offline. In addition, it automatically uploads changes to your app backend when connected.
Example:
The initialization syntax differs slightly between the Common and MAUI SDKs:
The PowerSync backend connector provides the connection between your application backend and the PowerSync client-side managed SQLite database.
It is used to:
Accordingly, the connector must implement two methods:
Example:
With your database instantiated and your connector ready, call connect
to start the synchronization process:
After connecting the client database, it is ready to be used. You can run queries and make updates as follows:
Enable logging to help you debug your app. By default, the SDK uses a no-op logger that doesn’t output any logs. To enable logging, you can configure a custom logger using .NET’s ILogger
interface: