Afrowave.AJIS.MongoDB 1.1.0

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

Afrowave.AJIS.MongoDB

NuGet

MongoDB integration for the AJIS (.NET) framework. Provides BSON serializers and collection operations for seamless document storage.

Overview

The MongoDB library enables storing AJIS-serialized objects in MongoDB documents:

  • BSON serializers - Custom MongoDB BSON serializers for AJIS
  • Collection operations - High-level CRUD operations
  • Aggregation pipeline - Full support for MongoDB aggregations
  • Async streaming - Efficient operations over large datasets
  • Type mapping - Full support for AJIS type mapping features

Features

  • BSON serializer - AjisBsonSerializer<T> for document serialization
  • Collection wrapper - AjisMongoCollection<T> for simplified operations
  • Repository pattern - AjisMongoRepository<T> for data access
  • Aggregation support - Pipeline operators and group operations
  • Index support - MongoDB index configuration
  • Bulk operations - Efficient batch insert/update/delete
  • Filter support - Strongly-typed filters with AJIS properties

Installation

dotnet add package Afrowave.AJIS.MongoDB

Dependencies

Package Version Description
Afrowave.AJIS.Core >= 1.0.0 Core contracts and settings
Afrowave.AJIS.Serialization >= 1.0.0 Serializer and value types
MongoDB.Driver >= 3.6.0 MongoDB .NET driver

Library Summary

Feature Description
Target Framework .NET 10.0
Serialization Format BSON (MongoDB format)
Key Components AjisBsonSerializer<T>, AjisMongoCollection<T>
Aggregation Support Full pipeline operators
Collection Operations Full CRUD operations
Nullable Reference Types Enabled

API

See the API Reference for complete documentation.

Key Types

Type Description
AjisBsonSerializer<T> BSON serializer for AJIS
AjisMongoCollection<T> MongoDB collection wrapper
AjisMongoRepository<T> Repository for CRUD operations
AjisMongoExtensions Extension methods for registration

Usage

Basic configuration

// Register AJIS serializers
AjisMongoExtensions.RegisterAjisSerializers();

// Repository
public class UserRepository : AjisMongoRepository<User>
{
    public UserRepository(IMongoDatabase database)
        : base(database, "users") { }
}

// Usage
var repository = new UserRepository(database);

// Insert document
await repository.InsertAsync(new User { Name = "John", Email = "john@example.com" });

// Find by ID
var user = await repository.GetByIdAsync(1);

// Complex queries
var activeUsers = await repository.FindAsync(u => u.IsActive && u.Age > 18);

Aggregation pipeline

var result = await repository.Aggregate()
    .Match(u => u.IsActive)
    .Group(u => u.Role, g => new { Role = g.Key, Count = g.Count() })
    .ToListAsync();

Bulk operations

var users = Enumerable.Range(1, 1000)
    .Select(i => new User { Name = $"User{i}", Age = i });

await repository.BulkInsertAsync(users);

Documentation

Compatibility

  • .NET 10.0+
  • MongoDB.Driver 3.6+
  • Nullable reference types enabled

License

MIT

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

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
1.1.0 159 2/17/2026
1.0.0 132 2/15/2026

## v1.1.0 (2026-02-16)

### New Features
- MongoDB BSON serializers now work with new Ajis static API
- Integration with new Ajis static API from Afrowave.AJIS.Core v1.1.0

### Dependencies
- Afrowave.AJIS.Core v1.1.0

### Notes
- No breaking changes in this release