Soenneker.Controllers.Base 4.0.74

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Controllers.Base --version 4.0.74
                    
NuGet\Install-Package Soenneker.Controllers.Base -Version 4.0.74
                    
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="Soenneker.Controllers.Base" Version="4.0.74" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Controllers.Base" Version="4.0.74" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Controllers.Base" />
                    
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 Soenneker.Controllers.Base --version 4.0.74
                    
#r "nuget: Soenneker.Controllers.Base, 4.0.74"
                    
#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 Soenneker.Controllers.Base@4.0.74
                    
#: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=Soenneker.Controllers.Base&version=4.0.74
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Controllers.Base&version=4.0.74
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Controllers.Base

Provides an abstract ASP.NET Core ControllerBase that exposes injected IConfiguration to derived controllers through a protected Config property.

Install

dotnet add package Soenneker.Controllers.Base

Usage

using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Soenneker.Controllers.Base;

[ApiController]
[Route("api/status")]
public sealed class StatusController : BaseController
{
    public StatusController(IConfiguration configuration) : base(configuration)
    {
    }

    [HttpGet]
    public IActionResult Get()
    {
        string? environment = Config["Environment"];
        return Ok(new { environment });
    }
}

BaseController adds no routes, filters, authorization policy, API-versioning behavior, or service registration. Derived controllers remain responsible for their normal ASP.NET Core attributes and must pass IConfiguration to the base constructor.

Config references the application's composed configuration. Whether values update at runtime depends on the underlying providers. Avoid returning secrets or raw configuration values from controller actions.

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 (2)

Showing the top 2 NuGet packages that depend on Soenneker.Controllers.Base:

Package Downloads
Soenneker.Controllers.Alerts

AlertsController provides endpoints for receiving Azure alerts and other similar requests

Soenneker.Controllers.Health

HealthController provides a public, anonymous-accessible HTTP GET endpoint that returns a simple health check response indicating if the API is online

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.86 458 10/14/2026
4.0.85 154 10/14/2026
4.0.84 86 10/14/2026
4.0.80 154 10/12/2026
4.0.79 138 10/12/2026
4.0.78 201 10/11/2026
4.0.77 747 9/24/2026
4.0.76 468 9/15/2026
4.0.75 341 9/12/2026
4.0.74 819 8/30/2026
4.0.73 208 8/29/2026
4.0.72 1,057 8/7/2026
4.0.71 183 8/6/2026
4.0.70 199 7/30/2026
4.0.69 346 7/27/2026
4.0.68 585 7/16/2026
4.0.67 1,384 6/18/2026
4.0.66 953 6/5/2026
4.0.65 1,261 4/22/2026
4.0.64 207 4/21/2026
Loading failed

Clarify base controller configuration contract