AspNetCore.SecurityKey - Security API Key Authentication Implementation for ASP.NET Core

A flexible and lightweight API key authentication library for ASP.NET Core applications that supports multiple authentication patterns and integrates seamlessly with ASP.NET Core’s authentication and authorization infrastructure.

Overview

AspNetCore.SecurityKey provides a complete API key authentication solution for ASP.NET Core applications with support for modern development patterns and best practices.

Key Features:

  • Multiple Input Sources - API keys via headers, query parameters, or cookies
  • Flexible Authentication - Works with ASP.NET Core’s built-in authentication or as standalone middleware
  • Extensible Design - Custom validation and extraction logic support
  • Rich Integration - Controller attributes, middleware, and minimal API support
  • OpenAPI Support - Automatic Swagger/OpenAPI documentation generation (.NET 9+)
  • High Performance - Minimal overhead with optional caching
  • Multiple Deployment Patterns - Attribute-based, middleware, or endpoint filters

Quick Start

  1. Install the package:


Equatable.Generator - Source generator for Equals and GetHashCode

Source generator for Equals and GetHashCode

Features

  • Override Equals and GetHashCode
  • Implement IEquatable<T>
  • Support class, record and struct types
  • Support EqualityComparer per property
  • Attribute based control of equality implementation
  • Comparers supported: String, Sequence, Dictionary, HashSet, Reference, and Custom
  • No runtime dependencies. Library is compile time dependence only.

Usage

Add package

Add the nuget package to your projects.

dotnet add package Equatable.Generator

Prevent including Equatable.Generator as a dependency

<PackageReference Include="Equatable.Generator" PrivateAssets="all" />

Requirements

This library requires:


Injectio - Source Generator for Dependency Injection

Source generator that helps register discovered services in the dependency injection container

Features

  • Transient, Singleton, Scoped service registration
  • Factory registration
  • Module method registration
  • Duplicate Strategy - Skip,Replace,Append
  • Registration Strategy - Self, Implemented Interfaces, Self With Interfaces

Usage

Add package

Add the nuget package project to your projects.

dotnet add package Injectio

Prevent dependances from including Injectio

<PackageReference Include="Injectio" PrivateAssets="all" />

Registration Attributes

Place registration attribute on class. The class will be discovered and registered.


Blazor Typeahead Control

Overview

The LoreSoft Blazor Controls project contains a collection of Blazor user controls.

Installing

The LoreSoft.Blazor.Controls library is available on nuget.org via package name LoreSoft.Blazor.Controls.

To install LoreSoft.Blazor.Controls, run the following command in the Package Manager Console

Install-Package LoreSoft.Blazor.Controls

Setup

To use, you need to include the following CSS and JS files in your index.html (Blazor WebAssembly) or _Host.cshtml (Blazor Server).

In the head tag add the following CSS.


Generate ASP.NET Core WebAPI model with Entity Framework Core Generator

Overview

In this tutorial, you’ll learn how to use the Entity Framework Core Generator to create an Entity Framework Core data model for an ASP.NET WebAPI. Entity Framework Core Generator (efg) is .NET Core command-line (CLI) tool to generate Entity Framework Core model from an existing database.

The code for this tutorial is available at https://github.com/pwelter34/EntityFrameworkCore.Generator.Demo

Tracker Database

This tutorial will be a database first model. The database is a simple task tracking database.