AIC.Core.Identity.Extensions.WebApi 2026.6.18.1

dotnet add package AIC.Core.Identity.Extensions.WebApi --version 2026.6.18.1
                    
NuGet\Install-Package AIC.Core.Identity.Extensions.WebApi -Version 2026.6.18.1
                    
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="AIC.Core.Identity.Extensions.WebApi" Version="2026.6.18.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AIC.Core.Identity.Extensions.WebApi" Version="2026.6.18.1" />
                    
Directory.Packages.props
<PackageReference Include="AIC.Core.Identity.Extensions.WebApi" />
                    
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 AIC.Core.Identity.Extensions.WebApi --version 2026.6.18.1
                    
#r "nuget: AIC.Core.Identity.Extensions.WebApi, 2026.6.18.1"
                    
#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 AIC.Core.Identity.Extensions.WebApi@2026.6.18.1
                    
#: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=AIC.Core.Identity.Extensions.WebApi&version=2026.6.18.1
                    
Install as a Cake Addin
#tool nuget:?package=AIC.Core.Identity.Extensions.WebApi&version=2026.6.18.1
                    
Install as a Cake Tool

AIC Core Libraries

Transforming Industry Through Technology

AIC — Aerospace, Intelligence & Cyber — provides cutting-edge, mission-ready software components powering secure, data-driven systems for the UK defence and national security sector.


Executive Summary

This repository contains the comprehensive enterprise .NET 10 library ecosystem developed by AIC (Aerospace Intelligence Cyber) for high-assurance environments spanning Defence, Government, and critical national infrastructure.

The solution provides 50+ modular packages implementing:

  • Data persistence abstractions supporting Entity Framework Core, MongoDB, MongoDB Realm, and Azure Cosmos DB
  • Enterprise-grade security & cryptography including post-quantum algorithms, asymmetric/symmetric encryption, and certificate management
  • Identity & access management with multi-tenant support, RBAC, audit logging, and API key/JWT authentication
  • Vector search & embeddings for AI/ML workloads via MongoDB Atlas Vector Search
  • Advanced middleware for rate limiting, geo-IP policies, authentication flows, and quota enforcement
  • Comprehensive caching abstractions supporting in-memory and distributed patterns

All packages follow SOLID principles, enforce deterministic builds, include SourceLink tracing, and are published automatically via Azure DevOps CI/CD pipelines.


Core Architecture

Design Principles

  • Modular & Composable: Each package is independently versioned and can be consumed alone or as part of a larger stack
  • SOLID & DRY: Strict adherence to Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles
  • Async-First: Full async/await support throughout, enabling scalable server applications
  • Generic Abstractions: Heavy use of generic interfaces (e.g., IRepository<TEntity, TId>, IDataService<TModel>) to reduce boilerplate
  • High-Assurance Security: Built for air-gapped and connected environments with cryptographic integrity checks
  • Multi-Tenant Ready: Built-in tenant and organisation scoping, quota enforcement, and organisational audit trails

Dependency Injection Pattern

All packages provide extension methods for seamless DI registration:

services
    .AddIdentityDataServices()
    .AddCachingServices()
    .AddCryptographyServices()
    .AddDataServices();

Packages & Capabilities

1. Data Access Layer

Purpose: Unified abstractions and implementations for persistent storage across multiple database engines.

Core Abstractions
  • AIC.Core.Data
    • IRepository<TEntity, TId> — Generic repository interface supporting create, read, update, delete, and complex queries
    • IEntity, IVectorisedEntity — Base entity contracts with ID and metadata support
    • IHasDisplayName, IHasId — Composable capability interfaces
    • SortDirection enum for query ordering
Multi-Database Support

Entity Framework Core

  • AIC.Core.Data.EntityFramework
    • BaseEntityFrameworkCoreRepository<TEntity, TId> — Full LINQ support with lazy loading, eager loading, and expression trees
    • Supports parameterized queries, complex predicates, and navigation property includes
    • Automatic change tracking and SaveChanges batching

MongoDB

  • AIC.Core.Data.MongoDb

    • BaseMongoDbRepository<TModel> — MongoDB-native repository with BSON serialization
    • Document-oriented queries with flexible schema evolution
    • Index management and aggregation pipeline support
  • AIC.Core.Data.MongoDb.Realm

    • BaseMongoDbRealmRepository<TModel> — MongoDB Realm-specific implementation for offline-first mobile scenarios
    • Sync-enabled data persistence with conflict resolution
    • Local realm management and real-time synchronization

Vector Search & Embeddings

  • AIC.Core.Data.MongoDb + Vector Extensions
    • BaseVectorisedMongoDbRepository<TModel> — Advanced vector search via MongoDB Atlas Vector Search
    • SearchVectorAsync() — Cosine similarity search over embeddings with configurable topK results
    • SearchVectorWithScoreAsync() — Returns both documents and relevance scores
    • SearchOrganisationVectorAsync() — Scoped vector search per organisation (multi-tenant aware)
    • Support for AI/ML embedding fields, semantic search, and RAG (Retrieval-Augmented Generation) workloads

Azure Cosmos DB

  • AIC.Core.Data.CosmosDb
    • BaseCosmosDbRepository<TEntity, TId> — Cosmos DB SDK integration
    • Partition key aware queries for global scale
    • Consistency level configuration and cross-partition query support
Generic Data Services
  • AIC.Core.Data.Services
    • BaseDataService<TModel, TId> — Generic CRUD service wrapping repositories
    • Standardised naming: GetByIdAsync(), GetAllAsync(), CreateAsync(), UpdateAsync(), DeleteByIdAsync()
    • Automatic logging and error handling
    • Supports batch operations and transaction coordination
Expression & Query Utilities