ServantSoftware.SettingsOnADO
1.0.0.29
See the version list below for details.
dotnet add package ServantSoftware.SettingsOnADO --version 1.0.0.29
NuGet\Install-Package ServantSoftware.SettingsOnADO -Version 1.0.0.29
<PackageReference Include="ServantSoftware.SettingsOnADO" Version="1.0.0.29" />
paket add ServantSoftware.SettingsOnADO --version 1.0.0.29
#r "nuget: ServantSoftware.SettingsOnADO, 1.0.0.29"
// Install ServantSoftware.SettingsOnADO as a Cake Addin #addin nuget:?package=ServantSoftware.SettingsOnADO&version=1.0.0.29 // Install ServantSoftware.SettingsOnADO as a Cake Tool #tool nuget:?package=ServantSoftware.SettingsOnADO&version=1.0.0.29
SettingsOnADO
An ADO.NET extension for centralizing application settings in a database store. Each setting class corresponds to a table, with each table having a single-row configuration.
A specialized JSON settings manager uses the JSON ADO.NET Provider
Table of Contents
Features
- Easy Setup: Integrate with your existing EF Core projects seamlessly.
- Centralized Settings: Store and manage your app settings in a unified manner.
- Single-row Configurations: Each setting class corresponds to a table with a unique configuration row.
Getting Started
Prerequisites
- .NET Framework 4.6.1/.NET 7 or higher
- An ADO.NET Data Provider to use for storage
Installation
- Install the
ServantSoftware.SettingsOnADO
package via NuGet:
dotnet add package ServantSoftware.SettingsOnADO
Package Name | Release (NuGet) |
---|---|
ServantSoftware.SettingsOnADO |
Usage
- Define your settings class with properties of simple data types. Here is an example:
namespace SettingsOnADO.Tests.TestClasses;
public class TestSettings
{
public int Id { get; set; }
public string Name { get; set; }
}
- Use the Get and Update methods from SettingsManager to retrieve and update settings:
// Set up a connection to the ADO.NET Data Provider (as needed)
var connection = new SqliteConnection("Data Source=:memory:");
connection.Open();
// Initialize SchemaManager with the connection
var schemaManager = new SchemaManager(connection);
var setting = settingsManager.Get<TestSettings>();
setting.Name = "MyName";
settingsManager.Update(setting);
For more detailed documentation, check our Wiki.
Using AesEncryptionProvider for Encryption
SettingsOnADO provides a default AES-based encryption provider. Here�s how to use it:
using SettingsOnADO;
// Set up a connection to the ADO.NET Data Provider (as needed)
var connection = new SqliteConnection("Data Source=:memory:");
connection.Open();
// Define key and IV (ensure proper key length for AES)
byte[] key = Encoding.UTF8.GetBytes("your-256-bit-key"); // 32 bytes
byte[] iv = Encoding.UTF8.GetBytes("your-128-bit-iv"); // 16 bytes
var encryptionProvider = new AesEncryptionProvider(key, iv);
var settingsManager = new SettingsManager(connection, true, encryptionProvider);
// Now you can use settingsManager to get and update settings with encryption.
Example: Using DataProtectionProvider for Encryption
Here is an example of how to use DataProtectionProvider
with the SettingsOnADO
library:
using Microsoft.AspNetCore.DataProtection;
using SettingsOnADO;
// Set up a connection to the ADO.NET Data Provider (as needed)
var connection = new SqliteConnection("Data Source=:memory:");
connection.Open();
var dataProtectionProvider = DataProtectionProvider.Create("SettingsOnADO");
var encryptionProvider = new DataProtectionEncryptionProvider(dataProtectionProvider);
var settingsManager = new SettingsManager(connection, true, encryptionProvider);
// Now you can use settingsManager to get and update settings with encryption.
Contributing
We welcome contributions to SettingsOnADO! Here's how you can help:
- Fork the repository on GitHub.
- Clone your fork locally.
- Commit your changes on a dedicated branch.
- Push your branch to your fork.
- Submit a pull request from your fork to the main repository.
- Engage in the review process and address feedback.
Please read our CONTRIBUTING.md for details on the process and coding standards.
Thread Safety Policy
No extra threading safeguards have been put in place, other than what is provided by the ADO.NET Data Provider that is used. It is up to the consumer of this library to put proper synchronization in place.
Issues
Feel free to submit issues and enhancement requests.
License
SettingsOnADO is licensed under the MIT License. See LICENSE for more information.
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 is compatible. 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 was computed. 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 was computed. 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. |
.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 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. 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. |
-
.NETStandard 2.0
- Microsoft.AspNetCore.DataProtection (>= 8.0.11)
-
net7.0
- Microsoft.AspNetCore.DataProtection (>= 8.0.11)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ServantSoftware.SettingsOnADO:
Package | Downloads |
---|---|
ServantSoftware.SettingsOnADO.Json
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0.32 | 80 | 1/8/2025 |
1.0.0.31 | 88 | 1/8/2025 |
1.0.0.30 | 165 | 12/18/2024 |
1.0.0.29 | 126 | 12/18/2024 |
1.0.0.28 | 107 | 12/16/2024 |
1.0.0.27 | 115 | 12/16/2024 |
1.0.0.26 | 130 | 12/14/2024 |
1.0.0.24 | 116 | 12/14/2024 |
1.0.0.21 | 160 | 7/11/2024 |
1.0.0.20 | 185 | 6/8/2024 |
1.0.0.19 | 192 | 6/8/2024 |
1.0.0.18 | 151 | 5/20/2024 |
1.0.0.16 | 152 | 5/20/2024 |
1.0.0.15 | 217 | 5/18/2024 |
1.0.0.13 | 156 | 5/17/2024 |
1.0.0.11 | 163 | 5/17/2024 |
1.0.0.9 | 184 | 4/19/2024 |
1.0.0.7 | 195 | 4/18/2024 |