Imato.ConfigurationProvider.SqlServer 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Imato.ConfigurationProvider.SqlServer --version 1.0.0
                    
NuGet\Install-Package Imato.ConfigurationProvider.SqlServer -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Imato.ConfigurationProvider.SqlServer" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Imato.ConfigurationProvider.SqlServer" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Imato.ConfigurationProvider.SqlServer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Imato.ConfigurationProvider.SqlServer --version 1.0.0
                    
#r "nuget: Imato.ConfigurationProvider.SqlServer, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Imato.ConfigurationProvider.SqlServer@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Imato.ConfigurationProvider.SqlServer&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Imato.ConfigurationProvider.SqlServer&version=1.0.0
                    
Install as a Cake Tool
Imato.ConfigurationProvider.SqlServer
Setup

Add startup configuration

var builder = Host.CreateApplicationBuilder(args);
        builder.Configuration.AddSqlConfigurations(c =>
        {
            c.ConnectionStringName = "Configurations"; // Connection name in Configurations to configuration DB. Default value: "Configurations"
            c.ConnectionString = "or your connection string";
            c.TableName = "dbo.Configurations"; // Table for configuration store. Default value: "dbo.Configurations"
            c.RefreshInterval = TimeSpan.FromMinutes(5); // Update options interval. Default: 5 min
            c.AppName = Assembly.GetEntryAssembly()?.GetName().Name; // App name in configuration table. Default: current package id
            c.EnvironmentName = "Development"; //.NET CORE Environment name from ASPNETCORE_ENVIRONMENT. Default: "Development"
            c.SyncLocalConfigsToDb = true; // Save yours local appsettings configuration into DB on start.Default: false
        });

and your table TableName from connection ConnectionStringName will be saved and updated every RefreshInterval in IConfiguration.

Using

Just get option from DB table in IConfiguration.

public record Test1(string Foo, int Bar);

var value = configureation.GetValueOf<Test1>();
            Console.WriteLine($"Test1: {JsonSerializer.Serialize(value)}");
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4 81 6/16/2026
1.0.3 106 6/9/2026
1.0.2 93 6/2/2026
1.0.1 96 5/29/2026
1.0.0 90 5/29/2026

Ready to use