Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "A set of .NET libraries for synchronizing data between cloud and

The Datasync Community Toolkit is a free [dotnet Foundation] [Community Toolkit] set of libraries that assists in providing offline data to your desktop and mobile applications. The data is stored in the cloud and synchronized to a local Sqlite database.

{{% badge style="primary" title="Version" %}}8.0.3{{% /badge %}}
{{% badge style="primary" title="Version" %}}8.0.4{{% /badge %}}

## Get started

Expand Down
1 change: 0 additions & 1 deletion docs/content/samples/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ There are a variety of samples in the [samples folder](https://github.com/Commun

* [AvaloniaUI](./todoapp/avalonia.md)
* [MAUI](./todoapp/maui.md)
* [Uno Platform](./todoapp/uno.md)
* [WinUI3](./todoapp/winui3.md)
* [WPF](./todoapp/wpf.md)
1 change: 0 additions & 1 deletion docs/content/samples/todoapp/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ title = "Todo App"

* [AvaloniaUI](./avalonia.md)
* [MAUI](./maui.md)
* [Uno Platform](./uno.md)
* [WinUI3](./winui3.md)
* [WPF](./wpf.md)

22 changes: 13 additions & 9 deletions docs/content/samples/todoapp/avalonia.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,33 @@
title = "Avalonia"
+++

> [!INFO]
> The Avalonia sample has been kindly contributed to the community by <a href="https://github.com/timunie">@timunie</a>.

## Run the application first

The Avalonia sample uses an in-memory Sqlite store for storing its data. The sample can run on Desktop, Mobile and Browser. To run the application locally:
The Avalonia sample uses an in-memory Sqlite store for storing its data. To run the application locally:

* [Configure Visual Studio for Avalonia development](https://docs.avaloniaui.net/docs/welcome).
* [Configure Visual Studio for Avalonia development](https://docs.avaloniaui.net/docs/get-started).
* Open `samples/todoapp/Samples.TodoApp.sln` in Visual Studio.
* In the Solution Explorer, expand the folder `TodoApp.Avalonia` and right-click the `TodoApp.Avalonia.Desktop` project, then select **Set as Startup Project**.
* In the Solution Explorer, expand the `TodoApp.Avalonia` folder, then right-click the `TodoApp.Avalonia.Desktop` project, then select **Set as Startup Project**.
* Select a target (in the top bar), then press F5 to run the application.

> [!TIP]
> We suggest to start testing and debugging using the Desktop App first. Once you feel confident, you can also try out Mobile or Browser version.
If you bump into issues at this point, ensure you can properly develop and run Avalonia applications for the desktop outside of the datasync service.

> [!NOTE]
> If you bump into issues at this point, please visit [Avalonia.Docs](https://docs.avaloniaui.net) and [Avalonia.Samples](https://github.com/AvaloniaUI/Avalonia.Samples) for some basic getting-started tutorials.
> [!TIP]
> The TodoApp.Avalonia sample is known to work on Android and Desktop. We have not tested on other platforms.

This is how the sample will look like:
![Avalonia sample on Desktop](assets/TodoApp.Avalonia.Desktop.png)


## Deploy a datasync server to Azure

Before you begin adjusting the application for offline usage, you must [deploy a datasync service](../server.md). Make a note of the URI of the service before continuing.

## Update the application for datasync operations

All the changes are isolated to the `Database/AppDbContext.cs` file.
All the changes are isolated to the `Database/AppDbContext.cs` file in the `TodoApp.Avalonia` shared project.

1. Change the definition of the class so that it inherits from `OfflineDbContext`:

Expand Down Expand Up @@ -77,4 +78,7 @@ All the changes are isolated to the `Database/AppDbContext.cs` file.

You can now re-run your application. Watch the console logs to show the interactions with the datasync service. Press the refresh button to synchronize data with the cloud. When you restart the application, your changes will automatically populate the database again.

> [!TIP]
> The first synchronization can take a while because of the cold-start of the service. Watch the debug output to see the synchronization happening.

Obviously, you will want to do much more in a "real world" application, including proper error handling, authentication, and using a Sqlite file instead of an in-memory database. This example shows off the minimum required to add datasync services to an application.
8 changes: 7 additions & 1 deletion docs/content/samples/todoapp/maui.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ The MAUI sample uses an in-memory Sqlite store for storing its data. To run the
* In the Solution Explorer, right-click the `TodoApp.MAUI` project, then select **Set as Startup Project**.
* Select a target (in the top bar), then press F5 to run the application.

The application runs on Android, iOS, and Windows. Each platform needs slightly different setup. Read the MAUI documentation for more information.
The application should run on Android, iOS, and Windows. Each platform needs slightly different setup. Read the MAUI documentation for more information.

> [!TIP]
> The TodoApp.MAUI sample is known to work on Android and Desktop. We have not tested on other platforms.

## Deploy a datasync server to Azure

Expand Down Expand Up @@ -69,4 +72,7 @@ All the changes are isolated to the `Database/AppDbContext.cs` file.

You can now re-run your application. Watch the console logs to show the interactions with the datasync service. Press the refresh button to synchronize data with the cloud. When you restart the application, your changes will automatically populate the database again.

> [!TIP]
> The first synchronization can take a while because of the cold-start of the service. Watch the debug output to see the synchronization happening.

Obviously, you will want to do much more in a "real world" application, including proper error handling, authentication, and using a Sqlite file instead of an in-memory database. This example shows off the minimum required to add datasync services to an application.
3 changes: 3 additions & 0 deletions docs/content/samples/todoapp/winui3.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ All the changes are isolated to the `Database/AppDbContext.cs` file.

You can now re-run your application. Watch the console logs to show the interactions with the datasync service. Press the refresh button to synchronize data with the cloud. When you restart the application, your changes will automatically populate the database again.

> [!TIP]
> The first synchronization can take a while because of the cold-start of the service. Watch the debug output to see the synchronization happening.

Obviously, you will want to do much more in a "real world" application, including proper error handling, authentication, and using a Sqlite file instead of an in-memory database. This example shows off the minimum required to add datasync services to an application.
3 changes: 3 additions & 0 deletions docs/content/samples/todoapp/wpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ All the changes are isolated to the `Database/AppDbContext.cs` file.

You can now re-run your application. Watch the console logs to show the interactions with the datasync service. Press the refresh button to synchronize data with the cloud. When you restart the application, your changes will automatically populate the database again.

> [!TIP]
> The first synchronization can take a while because of the cold-start of the service. Watch the debug output to see the synchronization happening.

Obviously, you will want to do much more in a "real world" application, including proper error handling, authentication, and using a Sqlite file instead of an in-memory database. This example shows off the minimum required to add datasync services to an application.
24 changes: 12 additions & 12 deletions docs/public/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head><script src="/Datasync/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=Datasync/livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta name="generator" content="Hugo 0.137.1">
<meta name="generator" content="Hugo 0.139.0">
<meta name="generator" content="Relearn 6.2.0+tip">
<meta name="description" content="">
<meta name="author" content="">
Expand All @@ -20,17 +20,17 @@
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
<link rel="manifest" href="/favicon/site.webmanifest">
<link href="/Datasync/css/fontawesome-all.min.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1731686403" rel="stylesheet"></noscript>
<link href="/Datasync/css/nucleus.css?1731686403" rel="stylesheet">
<link href="/Datasync/css/auto-complete.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1731686403" rel="stylesheet"></noscript>
<link href="/Datasync/css/perfect-scrollbar.min.css?1731686403" rel="stylesheet">
<link href="/Datasync/css/fonts.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1731686403" rel="stylesheet"></noscript>
<link href="/Datasync/css/theme.css?1731686403" rel="stylesheet">
<link href="/Datasync/css/theme-auto.css?1731686403" rel="stylesheet" id="R-variant-style">
<link href="/Datasync/css/chroma-auto.css?1731686403" rel="stylesheet" id="R-variant-chroma-style">
<link href="/Datasync/css/variant.css?1731686403" rel="stylesheet">
<link href="/Datasync/css/print.css?1731686403" rel="stylesheet" media="print">
<script src="/Datasync/js/variant.js?1731686403"></script>
<link href="/Datasync/css/fontawesome-all.min.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1734123542" rel="stylesheet"></noscript>
<link href="/Datasync/css/nucleus.css?1734123542" rel="stylesheet">
<link href="/Datasync/css/auto-complete.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1734123542" rel="stylesheet"></noscript>
<link href="/Datasync/css/perfect-scrollbar.min.css?1734123542" rel="stylesheet">
<link href="/Datasync/css/fonts.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1734123542" rel="stylesheet"></noscript>
<link href="/Datasync/css/theme.css?1734123542" rel="stylesheet">
<link href="/Datasync/css/theme-auto.css?1734123542" rel="stylesheet" id="R-variant-style">
<link href="/Datasync/css/chroma-auto.css?1734123542" rel="stylesheet" id="R-variant-chroma-style">
<link href="/Datasync/css/variant.css?1734123542" rel="stylesheet">
<link href="/Datasync/css/print.css?1734123542" rel="stylesheet" media="print">
<script src="/Datasync/js/variant.js?1734123542"></script>
<script>
window.relearn = window.relearn || {};
window.relearn.relBasePath='.';
Expand Down
43 changes: 22 additions & 21 deletions docs/public/categories/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head><script src="/Datasync/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=Datasync/livereload" data-no-instant defer></script>
<meta charset="utf-8">
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta name="generator" content="Hugo 0.137.1">
<meta name="generator" content="Hugo 0.139.0">
<meta name="generator" content="Relearn 6.2.0+tip">
<meta name="description" content="">
<meta name="author" content="">
Expand All @@ -20,17 +20,17 @@
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
<link rel="manifest" href="/favicon/site.webmanifest">
<link href="/Datasync/css/fontawesome-all.min.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1731686403" rel="stylesheet"></noscript>
<link href="/Datasync/css/nucleus.css?1731686403" rel="stylesheet">
<link href="/Datasync/css/auto-complete.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1731686403" rel="stylesheet"></noscript>
<link href="/Datasync/css/perfect-scrollbar.min.css?1731686403" rel="stylesheet">
<link href="/Datasync/css/fonts.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1731686403" rel="stylesheet"></noscript>
<link href="/Datasync/css/theme.css?1731686403" rel="stylesheet">
<link href="/Datasync/css/theme-auto.css?1731686403" rel="stylesheet" id="R-variant-style">
<link href="/Datasync/css/chroma-auto.css?1731686403" rel="stylesheet" id="R-variant-chroma-style">
<link href="/Datasync/css/variant.css?1731686403" rel="stylesheet">
<link href="/Datasync/css/print.css?1731686403" rel="stylesheet" media="print">
<script src="/Datasync/js/variant.js?1731686403"></script>
<link href="/Datasync/css/fontawesome-all.min.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1734123542" rel="stylesheet"></noscript>
<link href="/Datasync/css/nucleus.css?1734123542" rel="stylesheet">
<link href="/Datasync/css/auto-complete.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1734123542" rel="stylesheet"></noscript>
<link href="/Datasync/css/perfect-scrollbar.min.css?1734123542" rel="stylesheet">
<link href="/Datasync/css/fonts.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1734123542" rel="stylesheet"></noscript>
<link href="/Datasync/css/theme.css?1734123542" rel="stylesheet">
<link href="/Datasync/css/theme-auto.css?1734123542" rel="stylesheet" id="R-variant-style">
<link href="/Datasync/css/chroma-auto.css?1734123542" rel="stylesheet" id="R-variant-chroma-style">
<link href="/Datasync/css/variant.css?1734123542" rel="stylesheet">
<link href="/Datasync/css/print.css?1734123542" rel="stylesheet" media="print">
<script src="/Datasync/js/variant.js?1734123542"></script>
<script>
window.relearn = window.relearn || {};
window.relearn.relBasePath='..';
Expand Down Expand Up @@ -163,12 +163,12 @@ <h1 id="categories">Categories</h1>
<script>
var contentLangs=['en'];
</script>
<script src="/Datasync/js/auto-complete.js?1731686403" defer></script>
<script src="/Datasync/js/lunr/lunr.min.js?1731686403" defer></script>
<script src="/Datasync/js/lunr/lunr.stemmer.support.min.js?1731686403" defer></script>
<script src="/Datasync/js/lunr/lunr.multi.min.js?1731686403" defer></script>
<script src="/Datasync/js/lunr/lunr.en.min.js?1731686403" defer></script>
<script src="/Datasync/js/search.js?1731686403" defer></script>
<script src="/Datasync/js/auto-complete.js?1734123542" defer></script>
<script src="/Datasync/js/lunr/lunr.min.js?1734123542" defer></script>
<script src="/Datasync/js/lunr/lunr.stemmer.support.min.js?1734123542" defer></script>
<script src="/Datasync/js/lunr/lunr.multi.min.js?1734123542" defer></script>
<script src="/Datasync/js/lunr/lunr.en.min.js?1734123542" defer></script>
<script src="/Datasync/js/search.js?1734123542" defer></script>
</div>
<div id="R-homelinks" class="default-animation homelinks">
<ul>
Expand All @@ -185,6 +185,7 @@ <h1 id="categories">Categories</h1>
<li data-nav-id="/Datasync/samples/index.html" class=""><a class="padding" href="/Datasync/samples/index.html">Samples</a><ul id="R-subsections-cd759c081a923a28fc364a7ca7ecc995" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/samples/server/index.html" class=""><a class="padding" href="/Datasync/samples/server/index.html">Sample Server</a></li>
<li data-nav-id="/Datasync/samples/todoapp/index.html" class="alwaysopen"><a class="padding" href="/Datasync/samples/todoapp/index.html">Todo App</a><ul id="R-subsections-7781a542dc3f3e4e1a99b48a99d4c605" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/samples/todoapp/avalonia/index.html" class=""><a class="padding" href="/Datasync/samples/todoapp/avalonia/index.html">Avalonia</a></li>
<li data-nav-id="/Datasync/samples/todoapp/maui/index.html" class=""><a class="padding" href="/Datasync/samples/todoapp/maui/index.html">MAUI</a></li>
<li data-nav-id="/Datasync/samples/todoapp/winui3/index.html" class=""><a class="padding" href="/Datasync/samples/todoapp/winui3/index.html">WinUI3</a></li>
<li data-nav-id="/Datasync/samples/todoapp/wpf/index.html" class=""><a class="padding" href="/Datasync/samples/todoapp/wpf/index.html">WPF</a></li></ul></li></ul></li>
Expand Down Expand Up @@ -252,8 +253,8 @@ <h1 id="categories">Categories</h1>
</div>
</div>
</aside>
<script src="/Datasync/js/clipboard.min.js?1731686403" defer></script>
<script src="/Datasync/js/perfect-scrollbar.min.js?1731686403" defer></script>
<script src="/Datasync/js/theme.js?1731686403" defer></script>
<script src="/Datasync/js/clipboard.min.js?1734123542" defer></script>
<script src="/Datasync/js/perfect-scrollbar.min.js?1734123542" defer></script>
<script src="/Datasync/js/theme.js?1734123542" defer></script>
</body>
</html>
4 changes: 2 additions & 2 deletions docs/public/css/chroma-auto.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import "chroma-relearn-light.css?1731686403" screen and (prefers-color-scheme: light);
@import "chroma-relearn-dark.css?1731686403" screen and (prefers-color-scheme: dark);
@import "chroma-relearn-light.css?1734123542" screen and (prefers-color-scheme: light);
@import "chroma-relearn-dark.css?1734123542" screen and (prefers-color-scheme: dark);
4 changes: 2 additions & 2 deletions docs/public/css/format-print.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "theme-relearn-light.css?1731686403";
@import "chroma-relearn-light.css?1731686403";
@import "theme-relearn-light.css?1734123542";
@import "chroma-relearn-light.css?1734123542";

#R-sidebar {
display: none;
Expand Down
2 changes: 1 addition & 1 deletion docs/public/css/print.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import "format-print.css?1731686403";
@import "format-print.css?1734123542";
4 changes: 2 additions & 2 deletions docs/public/css/swagger.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Styles to make Swagger-UI fit into our theme */

@import "fonts.css?1731686403";
@import "variables.css?1731686403";
@import "fonts.css?1734123542";
@import "variables.css?1734123542";

body{
line-height: 1.574;
Expand Down
4 changes: 2 additions & 2 deletions docs/public/css/theme-auto.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import "theme-relearn-light.css?1731686403" screen and (prefers-color-scheme: light);
@import "theme-relearn-dark.css?1731686403" screen and (prefers-color-scheme: dark);
@import "theme-relearn-light.css?1734123542" screen and (prefers-color-scheme: light);
@import "theme-relearn-dark.css?1734123542" screen and (prefers-color-scheme: dark);
2 changes: 1 addition & 1 deletion docs/public/css/variant.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "variables.css?1731686403";
@import "variables.css?1734123542";

html {
color-scheme: only var(--INTERNAL-BROWSER-theme);
Expand Down
Loading