Implement backup and restore functionality; add IBackupService and BackupService; refactor services to use DbContextFactory

This commit is contained in:
2026-04-03 10:53:53 +02:00
parent 0923c037eb
commit 387c18e834
15 changed files with 411 additions and 71 deletions

View File

@@ -1,4 +1,5 @@
@inherits LayoutComponentBase
@using System.Reflection
<div class="d-flex flex-column vh-100">
<nav class="app-navbar d-flex justify-content-between align-items-center">
@@ -43,10 +44,17 @@
{
get
{
var now = DateTime.Now;
var yearShort = now.Year % 100;
var dayOfYear = now.DayOfYear;
return $"{yearShort}.{dayOfYear}";
var entryAssembly = Assembly.GetEntryAssembly();
var infoVersion = entryAssembly?
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?
.InformationalVersion;
if (!string.IsNullOrWhiteSpace(infoVersion))
{
return infoVersion.Split('+')[0];
}
return entryAssembly?.GetName().Version?.ToString(2) ?? "1.0";
}
}
}