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
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
using CommunityToolkit.Datasync.Server;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using ServerApp.Models;

namespace ServerApp.Controllers;

[Route("tables/todoitem")]
public class TodoItemController(IRepository<TodoItem> repository) : TableController<TodoItem>(repository)
public class TodoItemController : TableController<TodoItem>
{
}
public TodoItemController(IRepository<TodoItem> repository, ILogger<TodoItemController> logger)
: base(repository)
{
Logger = logger;
Options = new TableControllerOptions
{
// Demonstrates entity serialization in the logs (entity ID at Information, full entity at Debug).
// Only enable when the additional diagnostic detail is required and the log sink is secured,
// as entity contents may contain PII, secrets, or other sensitive business data.
UnsafeEntityLogging = true
};
}
}
4 changes: 2 additions & 2 deletions samples/todoapp-tutorial/ServerApp/ServerApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Datasync.Server" Version="10.0.0" />
<PackageReference Include="CommunityToolkit.Datasync.Server.InMemory" Version="10.0.0" />
<PackageReference Include="CommunityToolkit.Datasync.Server" Version="10.1.0" />
<PackageReference Include="CommunityToolkit.Datasync.Server.InMemory" Version="10.1.0" />
</ItemGroup>

</Project>