NuExt.Minimal.Mvvm.Desktop.Persistence
0.9.6
Prefix Reserved
dotnet add package NuExt.Minimal.Mvvm.Desktop.Persistence --version 0.9.6
NuGet\Install-Package NuExt.Minimal.Mvvm.Desktop.Persistence -Version 0.9.6
<PackageReference Include="NuExt.Minimal.Mvvm.Desktop.Persistence" Version="0.9.6" />
<PackageVersion Include="NuExt.Minimal.Mvvm.Desktop.Persistence" Version="0.9.6" />
<PackageReference Include="NuExt.Minimal.Mvvm.Desktop.Persistence" />
paket add NuExt.Minimal.Mvvm.Desktop.Persistence --version 0.9.6
#r "nuget: NuExt.Minimal.Mvvm.Desktop.Persistence, 0.9.6"
#:package NuExt.Minimal.Mvvm.Desktop.Persistence@0.9.6
#addin nuget:?package=NuExt.Minimal.Mvvm.Desktop.Persistence&version=0.9.6
#tool nuget:?package=NuExt.Minimal.Mvvm.Desktop.Persistence&version=0.9.6
NuExt.Minimal.Mvvm.Desktop.Persistence
NuExt.Minimal.Mvvm.Desktop.Persistence is a SQLite persistence layer for desktop MVVM applications. It combines NuExt.Minimal.Mvvm.Desktop with NuExt.System.Data.SQLite and holds the data access layer for MVVM models, without referencing a single UI framework.
Why NuExt.Minimal.Mvvm.Desktop.Persistence?
- Settings in a database -
KeyValueSettingmodels are read from and written to a settings table without a separate DTO layer. - Change-aware writes - only rows whose stored value or value type actually changed are written, independent of the change tracking state.
- Database bootstrap -
SQLiteDatabaseInitializerprepares the database directory and builds a validated migration plan that the application extends with its own scopes. - Explicit transactions - operations run inside a caller-owned
SQLiteDbContext, so settings reads and writes join the surrounding unit of work. - Provider foundation - built on the
NuExt.System.Data.SQLiteDAL infrastructure instead of an ORM. - No UI framework - no WPF, Avalonia, WinUI, or MAUI reference.
API Overview
KeyValueSettingDal: reads and writes key/value settings of an owner row - loadsKeyValueSettingmodels and saves only changed rows.AppVersionDal: stores application versions that own settings sets - finds the current version row, reads the latest one, and creates new rows.CreateAppSettings: migration inMinimal.Mvvm.Persistence.Migrationsthat creates the application version table, the key/value settings table, and the initial version row.AppVersionKey: settings set key that keeps settings of different application versions apart - only the major and minor version components are significant.SQLiteDatabaseInitializer: application database bootstrap - prepares the database directory, exposes a connection factory, and builds a validated migration plan for a single scope; the recorded version defaults to the entry assembly version.
Settings storage
KeyValueSettingDal expects a table with an owner id column plus the name, raw value, and value type columns (setting_name, setting_value, value_type). Rows are mapped to KeyValueSetting from NuExt.Minimal.Mvvm.Desktop:
- the raw value is stored as an invariant string;
KeyValueSetting.ValueTypeis aType, converted to and from the persisted token only at this boundary;- writes compare the stored values as well as the change tracking state, so a newly created setting is persisted even though
IsChangedis stillfalse, and unchanged rows are skipped.
The table name and the owner id column name are supplied by the application; the settings themselves are loaded into a KeyValueSettingCollection subclass, which can be filled with KeyValueSettingCollectionExtensions.Load from NuExt.Minimal.Mvvm.Desktop.
Compatibility
- .NET Standard 2.0+, .NET 8/9/10/11, and .NET Framework 4.6.2+
- SQLite provider:
NuExt.System.Data.SQLite - Does not reference any UI framework
Installation
Via NuGet:
dotnet add package NuExt.Minimal.Mvvm.Desktop.Persistence
Or via Visual Studio:
- Go to
Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution.... - Search for
NuExt.Minimal.Mvvm.Desktop.Persistence. - Click "Install".
Ecosystem
- NuExt.System
- NuExt.System.Data
- NuExt.System.Data.SQLite
- NuExt.Minimal.Mvvm
- NuExt.Minimal.Mvvm.SourceGenerator
- NuExt.Minimal.Behaviors.Wpf
- NuExt.Presentation.Wpf
- NuExt.Minimal.Mvvm.Wpf
- NuExt.Minimal.Mvvm.AvalonDock
- NuExt.Minimal.Mvvm.MahApps.Metro
- NuExt.Minimal.Mvvm.Desktop
Contributing
Issues and PRs are welcome. Keep changes minimal and performance-conscious.
License
MIT. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- NuExt.Minimal.Mvvm.Desktop (>= 0.9.6)
- NuExt.System.Data.SQLite (>= 0.9.4)
-
.NETFramework 4.7.1
- NuExt.Minimal.Mvvm.Desktop (>= 0.9.6)
- NuExt.System.Data.SQLite (>= 0.9.4)
-
.NETStandard 2.0
- NuExt.Minimal.Mvvm.Desktop (>= 0.9.6)
- NuExt.System.Data.SQLite (>= 0.9.4)
-
.NETStandard 2.1
- NuExt.Minimal.Mvvm.Desktop (>= 0.9.6)
- NuExt.System.Data.SQLite (>= 0.9.4)
-
net10.0
- NuExt.Minimal.Mvvm.Desktop (>= 0.9.6)
- NuExt.System.Data.SQLite (>= 0.9.4)
-
net11.0
- NuExt.Minimal.Mvvm.Desktop (>= 0.9.6)
- NuExt.System.Data.SQLite (>= 0.9.4)
-
net8.0
- NuExt.Minimal.Mvvm.Desktop (>= 0.9.6)
- NuExt.System.Data.SQLite (>= 0.9.4)
-
net9.0
- NuExt.Minimal.Mvvm.Desktop (>= 0.9.6)
- NuExt.System.Data.SQLite (>= 0.9.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.