devdeer.Libraries.AspNetCore.RestApi 21.0.0

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

devdeer.Libraries.AspNetCore.RestApi

Disclaimer

If you want to use this package you should be aware of some principles and practices we at DEVDEER use. So be aware that this is not backed by a public repository. The purpose here is to give out customers easy access to our logic. Nevertheless you are welcome to use this lib if it provides any advantages.

Summary

This package is used to provide startup logic, base types and other specific logic to ASP.NET Core API projects.

Please keep in mind that this package is not intended to be used in UI web projects!

Usage

One of the main purposes for this packages was the fact, that the initial configuration of ASP.NET APIs can be overwhelming. You need to inject dependencies and app components in the correct order. Also you often want to put configuration of those things to outside stores (appsettings.json in our case). This package now reduces all of this to only some lines of code. You could use this as follows in the Program.cs:

var options = new ConfigurationOptions
{
    // your explicit options and callbacks
};
var builder = WebApplication.CreateBuilder(args);
builder.Host.ConfigureLogging();
builder.Services.ConfigureServices(builder.Configuration, options);
// your additional DI here
var app = builder.Build();
app.ConfigureDefaults(options);
app.Run();

Now it is crucial to unserstand that ConfigureLogging(), ConfigureServices() and ConfigureDefaults() are methods coming from this package. The outcome can be controlled in 2 ways:

  1. Usage of ConfigurationOptions. You can define some of the wanted behavior using this type and pass it in.
  2. Putting elements in your appsettings.*.json.

Some common app settings are:

{
    "EntraId": {
		"Instance": "https://login.microsoftonline.com/",
		"TenantId": "",
		"Domain": ""
	},
	"Cors": {
		"EnableCors": true,
		"AllowCredentials": false,
		"AllowedHeaders": ["*"],
		"AllowedMethods": ["GET", "POST"]
	},
    "Swagger": {
		"ApiDescription": "",
		"DeprecatedApiMessage": "<p><strong><span style='color:white;background-color:red'>DEPRECATED</span></strong></p>",
		"Contact": {
			"Name": "",
			"Email": ""
		},
		"SupportedVersions": [{
			"Major": 1,
			"Minor": 0
		}],
		"Enable": true
	}
}

Using the syntax above will automatically configure the respective services in the correct order with just two lines of code.

More Details

Authentication

If the EntraId config option is set we automatically configure authentication to EntraId or Azure AD B2C/Entra ID Extenal Identities.

About DEVDEER

DEVDEER is a company from Magdeburg, Germany which is specialized in consulting, project management and development. We are very focussed on Microsoft Azure as a platform to run our products and solutions in the cloud. So all of our backend components usually runs in this environment and is developed using .NET. In the frontend area we are using react and a huge bunch of packages to build our UIs.

You can find us online:

Website

GitHub GitHub Org's stars

YouTube YouTube Channel Subscribers YouTube Channel Views

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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
21.0.1 22 9/29/2025
21.0.0 44 9/27/2025
20.2.4 346 8/28/2025
20.2.3 201 8/28/2025
20.2.2 341 8/13/2025
20.2.1 188 7/29/2025
20.2.0 117 7/29/2025
20.1.5 127 7/29/2025
20.1.4 120 7/29/2025
20.1.3 587 7/22/2025
20.1.2 535 7/22/2025
20.1.0 193 7/17/2025
20.0.2 168 7/17/2025
20.0.1 171 7/16/2025
20.0.0 162 7/16/2025
19.1.1 618 6/11/2025
19.1.0 159 5/30/2025
19.0.2 322 5/16/2025
19.0.1 248 5/16/2025
19.0.0 287 4/11/2025
18.0.1 348 3/18/2025
18.0.0 250 2/14/2025
17.1.7 656 1/15/2025
17.1.6 157 1/15/2025
17.1.5 603 1/8/2025
17.1.4 241 1/6/2025
17.1.3 197 1/6/2025
17.1.2 180 1/5/2025
17.1.1 174 1/5/2025
17.1.0 193 1/4/2025
17.0.2 538 12/24/2024
17.0.1 333 12/13/2024
17.0.0 285 12/11/2024
16.5.0 825 12/2/2024
16.4.7 274 11/1/2024
16.4.6 246 10/30/2024
16.4.5 176 10/30/2024
16.4.4 170 10/30/2024
16.4.3 564 10/27/2024
16.4.2 164 10/27/2024
16.4.1 162 10/27/2024
16.4.0 186 10/27/2024
16.3.3 291 10/14/2024
16.3.2 181 10/14/2024
16.3.1 223 10/12/2024
16.3.0 252 10/3/2024
16.2.2 491 8/23/2024
16.2.1 658 6/27/2024
16.2.0 178 6/27/2024
16.1.5 500 6/12/2024
16.1.4 183 6/12/2024
16.1.3 472 5/30/2024
16.1.2 185 5/29/2024
16.1.1 190 5/28/2024
16.1.0 178 5/28/2024
16.0.0 198 5/24/2024
15.0.1 215 5/19/2024
15.0.0 227 5/14/2024
14.4.3 181 5/14/2024
14.4.1 413 4/19/2024
14.4.0 199 4/19/2024
14.3.0 309 3/21/2024
14.2.0 409 3/11/2024
14.1.1 202 3/9/2024
14.1.0 201 3/9/2024
14.0.1 471 2/18/2024
14.0.0 650 1/20/2024
13.0.5 203 1/18/2024
13.0.4 570 12/25/2023
13.0.3 204 12/25/2023
13.0.2 365 12/11/2023
13.0.0 214 12/10/2023
12.7.5 363 11/9/2023
12.7.4 198 11/9/2023
12.7.3 264 10/29/2023
12.7.2 216 10/29/2023
12.7.1 305 9/27/2023
12.7.0 232 9/16/2023
12.6.4 236 9/14/2023
12.6.2 258 9/8/2023
12.6.1 244 9/7/2023
12.6.0 226 9/6/2023
12.5.0 566 8/15/2023
12.4.1 216 8/15/2023
12.4.0 247 8/15/2023
12.3.0 780 5/30/2023
12.2.1 268 5/29/2023
12.2.0 268 5/24/2023
12.1.0 274 5/24/2023
12.0.0 299 5/24/2023
11.0.5 794 5/23/2023
11.0.4 277 5/23/2023
11.0.3 245 5/23/2023
11.0.2 321 5/21/2023
11.0.1 274 5/21/2023
11.0.0 276 5/21/2023
10.6.0 299 5/21/2023
10.5.13 1,087 4/12/2023
10.5.12 321 4/12/2023
10.5.11 313 4/12/2023
10.5.10 566 4/12/2023
10.5.9 347 4/6/2023
10.5.8 547 3/14/2023
10.5.7 348 3/14/2023
10.5.6 757 3/11/2023
10.5.5 801 1/13/2023
10.5.4 657 1/10/2023
10.5.3 446 1/4/2023
10.5.2 426 1/3/2023
10.5.1 577 12/29/2022
10.5.0 664 12/29/2022
10.4.2 440 12/29/2022
10.4.0 780 12/23/2022
10.2.24 1,516 10/19/2022
10.2.23 542 10/19/2022
10.2.22 504 10/18/2022
10.2.21 509 10/17/2022
10.2.20 521 10/17/2022
10.2.19 531 10/17/2022
10.2.18 804 9/13/2022
10.2.17 1,371 9/13/2022
10.2.16 994 9/7/2022
10.2.15 807 9/6/2022
10.2.14 1,156 9/6/2022
10.2.13 578 9/6/2022
10.2.12 797 9/6/2022
10.2.11 797 9/6/2022
10.2.10 752 9/6/2022
10.2.9 1,007 9/5/2022
10.2.8 679 8/15/2022
10.2.7 622 8/13/2022
10.2.6 758 8/5/2022
10.2.5 742 7/19/2022
10.2.4 1,375 5/16/2022
10.2.3 659 5/16/2022
10.2.2 1,583 3/20/2022
10.2.0 752 3/20/2022
10.1.1 774 3/18/2022
10.1.0 742 3/14/2022
10.0.0 780 3/1/2022
9.0.4 797 2/28/2022
9.0.3 1,906 1/24/2022
9.0.2 676 12/22/2021
9.0.1 510 12/22/2021
9.0.0 503 12/22/2021
8.0.5 1,083 12/1/2021
8.0.3 1,161 8/14/2021
8.0.2 685 8/14/2021
8.0.1 773 8/14/2021
8.0.0 595 8/9/2021
7.0.13 1,497 7/12/2021
7.0.12 1,015 6/9/2021
7.0.11 1,494 5/1/2021
7.0.10 1,142 5/1/2021
1.4.0 905 8/25/2020

- BREAKING: No HSTS and HTTPS redirection are supported anymore. Instead all HTTP requests will be answered with a 400.
- BREAKING: EnvironmentHelper moved to namespace devdeer.Libraries.Utilities
- BREAKING: ConfigurationExtensions.ConfigurationExtensions now is set to "EntraId".
- BREAKING: AdGroupClaimAuthorizationHandler was renamed to EntraIdGroupClaimAuthorizationHandler.
- BREAKING: AdGroupClaimAuthorizationRequirement was renamed to EntraIdGroupClaimAuthorizationRequirement
- Using ValueTask<> instead of ValueTask<> as result type.
- Package updates.