using Microsoft.Data.Sqlite; namespace Duempelkas.Infrastructure.Services; public sealed class DatabaseLocation(string connectionString) { public string Path { get; } = System.IO.Path.GetFullPath(new SqliteConnectionStringBuilder(connectionString).DataSource); public string ConnectionString { get; } = connectionString; // All application mutations and restore share this gate. SQLite's backup API // also coordinates readers and external connections through SQLite locks. public SemaphoreSlim Writes { get; } = new(1, 1); }