mongodb-integration
Installation
SKILL.md
ABP MongoDB Integration
Guidance for the MongoDB data-access layer of an ABP solution. Types live in Volo.Abp.MongoDB. The integration lives in the *.MongoDB project; repository interfaces belong in the *.Domain project.
When to Use
- Defining an
AbpMongoDbContextand exposing collections asIMongoCollection<T>. - Naming collections with
[MongoCollection]and mapping entities inCreateModel. - Registering the DbContext and repositories with
AddMongoDbContext. - Writing a custom repository over
MongoDbRepository<TMongoDbContext, TEntity, TKey>. - Reaching another collection via
IMongoDbContextProvider<TMongoDbContext>, or dropping to the native driver withGetCollectionAsync()/GetAggregateAsync().
When Not to Use
- EF Core data access,
OnModelCreating, ordotnet efmigrations — use the ef-core-integration skill instead. - Transaction / Unit of Work boundaries — use manage-units-of-work.
- Soft-delete / multi-tenant / custom filters (including
MongoDbRepositoryFilterer) — use apply-data-filters. - Optimistic concurrency — use handle-optimistic-concurrency.
- Connection-string configuration — use configure-connection-strings; data seeding — use seed-application-data.