meerkat 3.0.0

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

Meerkat

Build, Test & Coverage codecov NuGet Version Docs License: MIT

Meerkat is an ODM (Object Document Mapper) for MongoDB in .NET. It wraps the official MongoDB driver and simplifies common data access patterns, modelling, querying, persistence, and indexing with a clean, strongly-typed API.


Installation

.NET CLI

dotnet add package meerkat

Package Manager Console

Install-Package meerkat

.csproj

<PackageReference Include="meerkat" Version="3.0.0" />

Quickstart

Initialise connection at startup:

using meerkat;

Meerkat.Connect("mongodb://user:password@host:port/database-name");

Define a model:

using meerkat;
using meerkat.Attributes;
using MongoDB.Bson;

[Collection(TrackTimestamps = true)]
public class Student : Schema<ObjectId>
{
    public string FirstName { get; set; } = string.Empty;
    public string LastName { get; set; } = string.Empty;

    public Student()
    {
        Id = ObjectId.GenerateNewId();
    }
}

Save and query:

// Save (upsert)
var student = new Student { FirstName = "Ada", LastName = "Lovelace" };
await student.SaveAsync();

// Find by ID
var found = await Meerkat.FindByIdAsync<Student, ObjectId>(student.Id);

Documentation

Comprehensive guides, API examples, and architecture documentation are available at https://bolorundurowb.github.io/meerkat/:

  • Defining Models — Schema base class, ID types, collection names, timestamps, and soft delete.
  • Querying — Predicate queries, LINQ queries, counting, and existence checks.
  • Persistence & Transactions — Save, SaveAll, removals, soft delete, and ambient multi-document transactions.
  • Atomic Updates — Fluent update builders and atomic numeric increment/decrement helpers.
  • Indexing — Single-field, unique, compound, TTL, geospatial indexes, and startup index verification.
  • Transforms & Hooks — String casing transforms and lifecycle hooks.
  • Architecture — Design goals, runtime model, and request flows.
  • Breaking Changes — Release notes and upgrade guides.

Running Docs Locally

To preview documentation locally:

pip install -r requirements-docs.txt
mkdocs serve

Contributing

Issues and pull requests are welcome at github.com/bolorundurowb/meerkat.


Licence

Meerkat is open source software licensed under the MIT Licence.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
3.0.0 115 9/20/2026
2.1.1 232 9/6/2026
2.1.0 250 6/1/2026
2.0.2 229 5/17/2026
2.0.1 277 2/26/2026
2.0.0 466 2/26/2025
1.1.0 2,784 2/2/2025
1.0.19 395 2/2/2025
1.0.18 438 8/17/2024
1.0.17 492 11/5/2023
1.0.16 326 11/5/2023
1.0.13 5,837 6/8/2022
1.0.12 820 2/4/2022
1.0.11 724 2/4/2022
1.0.10 594 1/3/2022
1.0.9 646 10/27/2021
1.0.8 608 10/27/2021
1.0.7 632 10/26/2021
Loading failed

3.0.0
     - Add ambient multi-document transactions via WithTransaction / WithTransactionAsync (writes and reads join the session automatically).
     - Add EnsureIndexes / EnsureIndexesAsync to create and verify attribute indexes at startup; missing indexes throw IndexVerificationException.
     - Add TTL indexes with SingleFieldIndex.ExpireAfter (durations such as "30d", "12h", or ISO-8601).
     - Add Unique on CompoundIndex for uniqueness across grouped fields.
     - Add opt-in soft delete ([Collection(SoftDelete = true)]): queries/counts/updates skip deleted documents by default; Restore* and HardRemove* for restore and permanent delete.
     - Add fluent atomic partial updates (Set, Unset, Push, Pull, AddToSet, Inc) with Update / UpdateOne / UpdateMany.
     - Replace mongo-url-parser with ciu-parser for connection-string parsing; bump MongoDB.Driver to 3.12.0.