Skip to content

Commit

Permalink
(#136) Added warning about .HasTrigger() to docs (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianhall authored Nov 13, 2024
1 parent 4a31e62 commit 8bedffd
Show file tree
Hide file tree
Showing 37 changed files with 1,275 additions and 731 deletions.
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.1{{% /badge %}}
{{% badge style="primary" title="Version" %}}8.0.3{{% /badge %}}

## Get started

Expand Down
12 changes: 6 additions & 6 deletions docs/content/in-depth/server/databases/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ You can find sample implementations of each supported context in our [Database T

For specific database support, see the following:

* [Azure Cosmos DB](./databases/cosmos.md)
* [Azure SQL and SQL Server](./databases/azuresql.md)
* [In Memory Datastore](./databases/in-memory.md)
* [LiteDb](./databases/litedb.md)
* [PostgreSQL](./databases/postgresql.md)
* [Sqlite](./databases/sqlite.md)
* [Azure Cosmos DB](./cosmos.md)
* [Azure SQL and SQL Server](./azuresql.md)
* [In Memory Datastore](./in-memory.md)
* [LiteDb](./litedb.md)
* [PostgreSQL](./postgresql.md)
* [Sqlite](./sqlite.md)
13 changes: 12 additions & 1 deletion docs/content/in-depth/server/databases/azuresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ BEGIN
END
```

You can install this trigger using either a migration or immediately after `EnsureCreated()` to create the database.
You can install this trigger using either a migration or immediately after `EnsureCreated()` to create the database. As with any Entity Framework Core based system, you must adjust your model within your `DbContext` as follows:

```csharp
protected void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);

builder.Entity<TodoItem>().ToTable(t => t.HasTrigger("TodoItems_UpdatedAt"));
}
```

For more information, review the [Entity Framework Core release notes](https://learn.microsoft.com/ef/core/what-is-new/ef-core-7.0/breaking-changes?tabs=v7#sqlserver-tables-with-triggers).

* [Test Azure SQL Context](https://github.com/CommunityToolkit/Datasync/blob/main/tests/CommunityToolkit.Datasync.TestCommon/Databases/AzureSql/AzureSqlDbContext.cs)
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.134.3">
<meta name="generator" content="Hugo 0.137.1">
<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?1727192619" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1727192619" rel="stylesheet"></noscript>
<link href="/Datasync/css/nucleus.css?1727192619" rel="stylesheet">
<link href="/Datasync/css/auto-complete.css?1727192619" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1727192619" rel="stylesheet"></noscript>
<link href="/Datasync/css/perfect-scrollbar.min.css?1727192619" rel="stylesheet">
<link href="/Datasync/css/fonts.css?1727192619" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1727192619" rel="stylesheet"></noscript>
<link href="/Datasync/css/theme.css?1727192619" rel="stylesheet">
<link href="/Datasync/css/theme-auto.css?1727192619" rel="stylesheet" id="R-variant-style">
<link href="/Datasync/css/chroma-auto.css?1727192619" rel="stylesheet" id="R-variant-chroma-style">
<link href="/Datasync/css/variant.css?1727192619" rel="stylesheet">
<link href="/Datasync/css/print.css?1727192619" rel="stylesheet" media="print">
<script src="/Datasync/js/variant.js?1727192619"></script>
<link href="/Datasync/css/fontawesome-all.min.css?1731521850" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1731521850" rel="stylesheet"></noscript>
<link href="/Datasync/css/nucleus.css?1731521850" rel="stylesheet">
<link href="/Datasync/css/auto-complete.css?1731521850" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1731521850" rel="stylesheet"></noscript>
<link href="/Datasync/css/perfect-scrollbar.min.css?1731521850" rel="stylesheet">
<link href="/Datasync/css/fonts.css?1731521850" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1731521850" rel="stylesheet"></noscript>
<link href="/Datasync/css/theme.css?1731521850" rel="stylesheet">
<link href="/Datasync/css/theme-auto.css?1731521850" rel="stylesheet" id="R-variant-style">
<link href="/Datasync/css/chroma-auto.css?1731521850" rel="stylesheet" id="R-variant-chroma-style">
<link href="/Datasync/css/variant.css?1731521850" rel="stylesheet">
<link href="/Datasync/css/print.css?1731521850" rel="stylesheet" media="print">
<script src="/Datasync/js/variant.js?1731521850"></script>
<script>
window.relearn = window.relearn || {};
window.relearn.relBasePath='.';
Expand Down
58 changes: 29 additions & 29 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.134.3">
<meta name="generator" content="Hugo 0.137.1">
<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?1727192619" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1727192619" rel="stylesheet"></noscript>
<link href="/Datasync/css/nucleus.css?1727192619" rel="stylesheet">
<link href="/Datasync/css/auto-complete.css?1727192619" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1727192619" rel="stylesheet"></noscript>
<link href="/Datasync/css/perfect-scrollbar.min.css?1727192619" rel="stylesheet">
<link href="/Datasync/css/fonts.css?1727192619" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1727192619" rel="stylesheet"></noscript>
<link href="/Datasync/css/theme.css?1727192619" rel="stylesheet">
<link href="/Datasync/css/theme-auto.css?1727192619" rel="stylesheet" id="R-variant-style">
<link href="/Datasync/css/chroma-auto.css?1727192619" rel="stylesheet" id="R-variant-chroma-style">
<link href="/Datasync/css/variant.css?1727192619" rel="stylesheet">
<link href="/Datasync/css/print.css?1727192619" rel="stylesheet" media="print">
<script src="/Datasync/js/variant.js?1727192619"></script>
<link href="/Datasync/css/fontawesome-all.min.css?1731521850" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1731521850" rel="stylesheet"></noscript>
<link href="/Datasync/css/nucleus.css?1731521850" rel="stylesheet">
<link href="/Datasync/css/auto-complete.css?1731521850" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1731521850" rel="stylesheet"></noscript>
<link href="/Datasync/css/perfect-scrollbar.min.css?1731521850" rel="stylesheet">
<link href="/Datasync/css/fonts.css?1731521850" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1731521850" rel="stylesheet"></noscript>
<link href="/Datasync/css/theme.css?1731521850" rel="stylesheet">
<link href="/Datasync/css/theme-auto.css?1731521850" rel="stylesheet" id="R-variant-style">
<link href="/Datasync/css/chroma-auto.css?1731521850" rel="stylesheet" id="R-variant-chroma-style">
<link href="/Datasync/css/variant.css?1731521850" rel="stylesheet">
<link href="/Datasync/css/print.css?1731521850" rel="stylesheet" media="print">
<script src="/Datasync/js/variant.js?1731521850"></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?1727192619" defer></script>
<script src="/Datasync/js/lunr/lunr.min.js?1727192619" defer></script>
<script src="/Datasync/js/lunr/lunr.stemmer.support.min.js?1727192619" defer></script>
<script src="/Datasync/js/lunr/lunr.multi.min.js?1727192619" defer></script>
<script src="/Datasync/js/lunr/lunr.en.min.js?1727192619" defer></script>
<script src="/Datasync/js/search.js?1727192619" defer></script>
<script src="/Datasync/js/auto-complete.js?1731521850" defer></script>
<script src="/Datasync/js/lunr/lunr.min.js?1731521850" defer></script>
<script src="/Datasync/js/lunr/lunr.stemmer.support.min.js?1731521850" defer></script>
<script src="/Datasync/js/lunr/lunr.multi.min.js?1731521850" defer></script>
<script src="/Datasync/js/lunr/lunr.en.min.js?1731521850" defer></script>
<script src="/Datasync/js/search.js?1731521850" defer></script>
</div>
<div id="R-homelinks" class="default-animation homelinks">
<ul>
Expand All @@ -179,26 +179,26 @@ <h1 id="categories">Categories</h1>
<div id="R-content-wrapper" class="highlightable">
<div id="R-topics">
<ul class="enlarge morespace collapsible-menu">
<li data-nav-id="/Datasync/setup/index.html" class=""><a class="padding" href="/Datasync/setup/index.html">Getting started</a><ul id="R-subsections-6a385b5ee9f4b02ef7c93cf34bdd6ea2" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/setup/index.html" class=""><a class="padding" href="/Datasync/setup/index.html">Getting started</a><ul id="R-subsections-6227866f48ed84c1396d1ed3111b2e1b" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/setup/server/index.html" class=""><a class="padding" href="/Datasync/setup/server/index.html">Datasync server</a></li>
<li data-nav-id="/Datasync/setup/client/index.html" class=""><a class="padding" href="/Datasync/setup/client/index.html">Client application</a></li></ul></li>
<li data-nav-id="/Datasync/samples/index.html" class=""><a class="padding" href="/Datasync/samples/index.html">Samples</a><ul id="R-subsections-abc4562a0bcf1570d92f916bb82a8b39" class="morespace collapsible-menu">
<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-64deac9d85858c681d35e673e0fd3b13" class="morespace collapsible-menu">
<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/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>
<li data-nav-id="/Datasync/in-depth/index.html" class=""><a class="padding" href="/Datasync/in-depth/index.html">In-depth</a><ul id="R-subsections-3229b26a09fade6cbffa6d892da9210c" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/in-depth/server/index.html" class="alwaysopen"><a class="padding" href="/Datasync/in-depth/server/index.html">Datasync Server</a><ul id="R-subsections-991d9dab262acb1d6880fda1bc7a5221" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/in-depth/server/databases/index.html" class="alwaysopen"><a class="padding" href="/Datasync/in-depth/server/databases/index.html">Database support</a><ul id="R-subsections-2d5568f2a27d469d423218e65149f559" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/in-depth/index.html" class=""><a class="padding" href="/Datasync/in-depth/index.html">In-depth</a><ul id="R-subsections-b0d6aef41206af664257728a117f3c0a" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/in-depth/server/index.html" class="alwaysopen"><a class="padding" href="/Datasync/in-depth/server/index.html">Datasync Server</a><ul id="R-subsections-dc99c32b9911fd1f0895342363923d5f" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/in-depth/server/databases/index.html" class="alwaysopen"><a class="padding" href="/Datasync/in-depth/server/databases/index.html">Database support</a><ul id="R-subsections-0a9996f2d02aaae5106f28361ee97b87" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/in-depth/server/databases/cosmos/index.html" class=""><a class="padding" href="/Datasync/in-depth/server/databases/cosmos/index.html">Azure Cosmos DB</a></li>
<li data-nav-id="/Datasync/in-depth/server/databases/azuresql/index.html" class=""><a class="padding" href="/Datasync/in-depth/server/databases/azuresql/index.html">Azure SQL &amp; SQL Server</a></li>
<li data-nav-id="/Datasync/in-depth/server/databases/in-memory/index.html" class=""><a class="padding" href="/Datasync/in-depth/server/databases/in-memory/index.html">In-memory datastore</a></li>
<li data-nav-id="/Datasync/in-depth/server/databases/litedb/index.html" class=""><a class="padding" href="/Datasync/in-depth/server/databases/litedb/index.html">LiteDb</a></li>
<li data-nav-id="/Datasync/in-depth/server/databases/postgresql/index.html" class=""><a class="padding" href="/Datasync/in-depth/server/databases/postgresql/index.html">PostgreSQL</a></li>
<li data-nav-id="/Datasync/in-depth/server/databases/sqlite/index.html" class=""><a class="padding" href="/Datasync/in-depth/server/databases/sqlite/index.html">Sqlite</a></li></ul></li></ul></li>
<li data-nav-id="/Datasync/in-depth/client/index.html" class="alwaysopen"><a class="padding" href="/Datasync/in-depth/client/index.html">Client application</a><ul id="R-subsections-2bf83e84435a33452d7389fc82205491" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/in-depth/client/oneline-operations/index.html" class=""><a class="padding" href="/Datasync/in-depth/client/oneline-operations/index.html">Online operations</a></li>
<li data-nav-id="/Datasync/in-depth/client/index.html" class="alwaysopen"><a class="padding" href="/Datasync/in-depth/client/index.html">Client application</a><ul id="R-subsections-60c8d76d913730d5c907aa0f8134456a" class="morespace collapsible-menu">
<li data-nav-id="/Datasync/in-depth/client/online-operations/index.html" class=""><a class="padding" href="/Datasync/in-depth/client/online-operations/index.html">Online operations</a></li>
<li data-nav-id="/Datasync/in-depth/client/auth/index.html" class=""><a class="padding" href="/Datasync/in-depth/client/auth/index.html">Authentication</a></li></ul></li></ul></li>
</ul>
</div>
Expand Down Expand Up @@ -252,8 +252,8 @@ <h1 id="categories">Categories</h1>
</div>
</div>
</aside>
<script src="/Datasync/js/clipboard.min.js?1727192619" defer></script>
<script src="/Datasync/js/perfect-scrollbar.min.js?1727192619" defer></script>
<script src="/Datasync/js/theme.js?1727192619" defer></script>
<script src="/Datasync/js/clipboard.min.js?1731521850" defer></script>
<script src="/Datasync/js/perfect-scrollbar.min.js?1731521850" defer></script>
<script src="/Datasync/js/theme.js?1731521850" 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?1727192619" screen and (prefers-color-scheme: light);
@import "chroma-relearn-dark.css?1727192619" screen and (prefers-color-scheme: dark);
@import "chroma-relearn-light.css?1731521850" screen and (prefers-color-scheme: light);
@import "chroma-relearn-dark.css?1731521850" 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?1727192619";
@import "chroma-relearn-light.css?1727192619";
@import "theme-relearn-light.css?1731521850";
@import "chroma-relearn-light.css?1731521850";

#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?1727192619";
@import "format-print.css?1731521850";
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?1727192619";
@import "variables.css?1727192619";
@import "fonts.css?1731521850";
@import "variables.css?1731521850";

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?1727192619" screen and (prefers-color-scheme: light);
@import "theme-relearn-dark.css?1727192619" screen and (prefers-color-scheme: dark);
@import "theme-relearn-light.css?1731521850" screen and (prefers-color-scheme: light);
@import "theme-relearn-dark.css?1731521850" 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?1727192619";
@import "variables.css?1731521850";

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

0 comments on commit 8bedffd

Please sign in to comment.