Skip to content

[13.2 Docs] Add MongoDB Entity Framework Core integration documentation #412

@joperezr

Description

@joperezr

Summary

Aspire 13.2 introduces a brand new client integration package: Aspire.MongoDB.EntityFrameworkCore. This integration needs a dedicated documentation page covering both the hosting and client sides.

Current State

  • No documentation exists for this integration.
  • The existing MongoDB docs (under integrations/databases/mongodb/) cover the standard MongoDB driver integration (Aspire.MongoDB.Driver) but not the EF Core variant.
  • The integrations/databases/efcore/ section has pages for SQL Server, PostgreSQL, MySQL, Oracle, Azure SQL, Azure PostgreSQL, and Azure Cosmos DB — but not MongoDB.
  • The feature is briefly mentioned in whats-new/aspire-13-2.mdx.

What's Needed

Create a new documentation page (or set of pages) following the pattern of other EF Core integrations. Suggested location: integrations/databases/efcore/mongodb/ or integrations/databases/mongodb/mongodb-efcore.mdx.

The documentation should include:

Client Integration

  1. Package installation: dotnet add package Aspire.MongoDB.EntityFrameworkCore
  2. Registration: How to call AddMongoDBDbContext<TContext>() (or equivalent) in Program.cs
  3. Configuration: Connection string, configuration providers (Aspire:MongoDB:EntityFrameworkCore key), and inline delegates
  4. DI usage: How to inject and use the DbContext
  5. Health checks, logging, and telemetry: What's automatically enabled

AppHost Integration

  1. How to reference the MongoDB hosting resource with WithReference
  2. Connection name matching between AppHost and service project

Additional Considerations

  • Relationship to the existing Aspire.MongoDB.Driver integration
  • When to use the EF Core integration vs. the standard driver integration
  • Any limitations or preview status

Context

  • Brand new integration in Aspire 13.2
  • Follow the pattern of existing EF Core integration docs (e.g., integrations/databases/efcore/postgres/)
  • The Aspire.MongoDB.EntityFrameworkCore package source is at src/Components/Aspire.MongoDB.EntityFrameworkCore/ in the dotnet/aspire repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions