ABP Framework — MongoDB

Configure AbpMongoDbContext, collection mapping, and repositories in ABP Framework v10.4.

13|4|Updated May 27, 2026
One-click install
npx skills add https://github.com/burakdmir/abp-skills --skill abp-framework-mongodb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ABP Framework — MongoDB
Source: https://github.com/burakdmir/abp-skills/tree/main/claude/abp-mongodb
Command: npx skills add https://github.com/burakdmir/abp-skills --skill abp-framework-mongodb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the challenge of implementing MongoDB support in an ABP Framework v10.4 application with the correct DbContext setup, collection mapping, and repository patterns.

Core Features & Use Cases

  • MongoDbContext integration: Configure AbpMongoDbContext via IMongoModelBuilder, register the context in DI, and map entities to MongoDB collections.
  • Collection mapping & indexing: Define collection names, ignore properties, and configure collation and index models inside CreateModel.
  • Repositories, transactions, and advanced patterns: Use default repositories, add custom MongoDB repositories, handle transactions (replica set required), and apply patterns like ReplaceDbContext, bulk operation customization, and multi-tenancy connection strategies.

Quick Start

Ask the AI to generate a complete ABP MongoDB setup for a MyMongoDbContext that maps Question and Category, configures an index, registers default repositories, and includes a custom repository method for a filtered delete.

Frequently Asked Questions about ABP Framework — MongoDB

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure AbpMongoDbContext to map entities to MongoDB collections in ABP Framework?

Configure AbpMongoDbContext by implementing IMongoModelBuilder to map entities to MongoDB collections, registering the context via dependency injection, and defining collection names and ignored properties inside the CreateModel method for ABP v10.4.

How do I create indexes with collation for MongoDB collections in an ABP application?

Create indexes with collation in ABP MongoDB by configuring index models inside the CreateModel method of your AbpMongoDbContext implementation, allowing precise control over indexing behavior and collection-level collation settings.

Does ABP Framework support MongoDB multi-document transactions?

Yes, ABP Framework supports MongoDB multi-document transactions, but enabling them requires a MongoDB replica set deployment to ensure transactional data consistency across multiple operations.

Can I add custom MongoDB repositories alongside default repositories in ABP?

Yes, you can register default repositories and add custom MongoDB repositories in ABP by implementing custom repository classes for specialized operations like filtered deletes, then registering them through ABP's dependency injection system.

How do multi-tenancy connection strategies work with MongoDB in ABP Framework?

MongoDB multi-tenancy in ABP Framework utilizes specific connection strategies within the AbpMongoDbContext setup to isolate tenant data, often combined with ReplaceDbContext patterns to manage separate database contexts per tenant.

What are the limitations of using MongoDB with ABP Framework compared to EF Core?

MongoDB with ABP Framework requires replica sets for multi-document transactions and uses collection-based mapping via CreateModel instead of relational migrations, limiting complex cross-document joins available in EF Core.