Skip to content

docs: demonstrate UnsafeEntityLogging in todoapp-tutorial server walkthrough (#476) - #487

Merged
adrianhall merged 1 commit into
CommunityToolkit:mainfrom
adrianhall:issues/476
Jul 6, 2026
Merged

docs: demonstrate UnsafeEntityLogging in todoapp-tutorial server walkthrough (#476)#487
adrianhall merged 1 commit into
CommunityToolkit:mainfrom
adrianhall:issues/476

Conversation

@adrianhall

Copy link
Copy Markdown
Collaborator

Summary

v10.1.0 added the UnsafeEntityLogging option to TableControllerOptions (#446). samples/todoapp-tutorial is the main walkthrough referenced from docs/tutorial/client/part-1.md and part-2.md ([todoapp]), so this updates it to demonstrate the option by enabling sensitive entity logging, following the same pattern already used in the todoapp-mvc sample (#480 / #485, which demonstrated the secure false default).

Changes

  • samples/todoapp-tutorial/ServerApp/ServerApp.csproj: bump CommunityToolkit.Datasync.Server and CommunityToolkit.Datasync.Server.InMemory from 10.0.0 to 10.1.0 so the sample builds against the release that introduced UnsafeEntityLogging.
  • samples/todoapp-tutorial/ServerApp/Controllers/TodoItemController.cs: replace the primary-constructor controller with an explicit constructor that wires an ILogger<TodoItemController> and sets Options = new TableControllerOptions { UnsafeEntityLogging = true }, with a comment explaining the security implication (entity contents may contain PII, secrets, or other sensitive business data; only enable when the log sink is secured).

Acceptance criteria

  • samples/todoapp-tutorial/ServerApp enables UnsafeEntityLogging = true and wires an ILogger.
  • A code comment explains the security implication of enabling the option.
  • The sample builds against v10.1.0.

Verification

  • dotnet restore + dotnet build on samples/todoapp-tutorial/ServerApp/ServerApp.csproj — succeeded, 0 warnings/errors.
  • dotnet restore/dotnet build on Datasync.Toolkit.sln — succeeded (pre-existing, unrelated NU1903 advisories only; the sample is not part of this solution and is unaffected).

Closes #476

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Examples: Demonstrate UnsafeEntityLogging in the todoapp-tutorial server walkthrough (#446)

1 participant