Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New article]: Entity Framework and .NET Aspire #2574

Open
alistairmatthews opened this issue Feb 12, 2025 · 3 comments · May be fixed by #2666
Open

[New article]: Entity Framework and .NET Aspire #2574

alistairmatthews opened this issue Feb 12, 2025 · 3 comments · May be fixed by #2666
Assignees
Labels
doc-idea Indicates issues that are suggestions for new topics [org][type][category] in-pr ⌚ Not Triaged Not triaged

Comments

@alistairmatthews
Copy link
Contributor

alistairmatthews commented Feb 12, 2025

Proposed topic or title

Use Entity Framework with .NET Aspire

Location in table of contents.

Integrations

Reason for the article

We have around 17 open issues that relate to EF and .NET Aspire, such as:

I'm working on a new article to address as many of these as I can. Please let me know your thoughts by commenting on this issue.

The existing EF coverage consists of:

IMHO we need a new article to cover all these issues in depth, not a tutorial that only covers one scenario.

Article abstract

Topics to include:

  • When to use Aspire's AddXDbContext() method for each integration
  • When to use EnrichXDbContext() with examples using Interceptors
  • DBContextFactories and whether to use them in Aspire
  • Database context pooling in .NET Aspire. When is it good? How to use/not use it
  • Database first, code first, model first in Aspire
  • Migrations
    • Workflow for applying migrations
    • Why use a separate migrations service?
    • Whether to use a transaction with each migration (not for v9)
    • Troubleshooting tips

I think I'll include pivots for the four EF Integrations:

  • SQL Server
  • PostgreSQL
  • MySQL Pomelo
  • Oracle

Relevant searches

No response

@alistairmatthews alistairmatthews added the doc-idea Indicates issues that are suggestions for new topics [org][type][category] label Feb 12, 2025
@dotnetrepoman dotnetrepoman bot added the ⌚ Not Triaged Not triaged label Feb 12, 2025
@alistairmatthews
Copy link
Contributor Author

@roji ~ we wondered if you have any comment on this proposed article? If so feel free, and I'll incorporate it as I write. Thanks!

@roji
Copy link
Member

roji commented Feb 14, 2025

/cc @AndriySvyryd who worked on the various Aspire-related migrations/seeding adjustments in EF 9.0, and who probably would be the best person to review/help out with guidance.

I'm not very familiar with Aspire's documentation and/or which level they go into, but the above looks great to me - deeper guidance on recommended patterns for Aspire and EF usage is something we've also discussed in the EF team, but haven't had bandwidth to look at. There's the usual question of where this lives - EF vs. Aspire docs - and how cross-linking between the two works; but I wouldn't worry about it too much, if a deep article on the Aspire side makes sense, we can simply link to it from the EF docs, at least for now.

@alistairmatthews
Copy link
Contributor Author

#2666 covers using EF DB Contexts in .NET Aspire. I'm planning a separate article about migrations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-idea Indicates issues that are suggestions for new topics [org][type][category] in-pr ⌚ Not Triaged Not triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants