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
<PackageReference Include="AIC.Core.Identity.Extensions.WebApi" Version="2026.6.18.1" />
<PackageVersion Include="AIC.Core.Identity.Extensions.WebApi" Version="2026.6.18.1" />
<PackageReference Include="AIC.Core.Identity.Extensions.WebApi" />
paket add AIC.Core.Identity.Extensions.WebApi --version 2026.6.18.1
#r "nuget: AIC.Core.Identity.Extensions.WebApi, 2026.6.18.1"
#:package AIC.Core.Identity.Extensions.WebApi@2026.6.18.1
#addin nuget:?package=AIC.Core.Identity.Extensions.WebApi&version=2026.6.18.1
#tool nuget:?package=AIC.Core.Identity.Extensions.WebApi&version=2026.6.18.1
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.DataIRepository<TEntity, TId>— Generic repository interface supporting create, read, update, delete, and complex queriesIEntity,IVectorisedEntity— Base entity contracts with ID and metadata supportIHasDisplayName,IHasId— Composable capability interfacesSortDirectionenum for query ordering
Multi-Database Support
Entity Framework Core
AIC.Core.Data.EntityFrameworkBaseEntityFrameworkCoreRepository<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.MongoDbBaseMongoDbRepository<TModel>— MongoDB-native repository with BSON serialization- Document-oriented queries with flexible schema evolution
- Index management and aggregation pipeline support
AIC.Core.Data.MongoDb.RealmBaseMongoDbRealmRepository<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 ExtensionsBaseVectorisedMongoDbRepository<TModel>— Advanced vector search via MongoDB Atlas Vector SearchSearchVectorAsync()— Cosine similarity search over embeddings with configurable topK resultsSearchVectorWithScoreAsync()— Returns both documents and relevance scoresSearchOrganisationVectorAsync()— 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.CosmosDbBaseCosmosDbRepository<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.ServicesBaseDataService<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