Add user preferences management via distributed cache
Introduced `UserPreferencesDto` to represent UI preferences, including theme, dark mode, and grid layouts. Added the `IUserPreferencesService` interface and implemented it in `UserPreferencesService` to manage preferences stored in the distributed cache (`dbo.TBDD_CACHE`). Registered `UserPreferencesService` in dependency injection and added a NuGet reference for `Microsoft.Extensions.Caching.Abstractions`. Created `UserPreferencesController` with `GET` and `PUT` endpoints to retrieve and save user preferences. Validated theme names in the `PUT` endpoint. Updated `Program.cs` to ensure proper service registration.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.6.1" />
|
||||
<PackageReference Include="HtmlSanitizer" Version="9.0.892" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.6" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.82.1" />
|
||||
<PackageReference Include="QuestPDF" Version="2025.7.1" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12" />
|
||||
|
||||
Reference in New Issue
Block a user