Please please please write real doc Entity Framework + Postgres Migrations
Entity Framework is very important.
Migrations are a CRITICAL part of using Entity Framework.
The existing Sql Server sample doesn't work with Postgres, takes a considerable amount of work to hack into a state that can work with a different database, and in the end doesn't explain how to set one's one project up to create migrations.
It's highly not-trivial to figure this out.
There are many closed issues on this topic, none of which actually tell a normal developer who isn't on the Aspire team how to create a migration.
Examples include:
- https://github.com/dotnet/aspire/issues/398
- https://github.com/dotnet/aspire/pull/2263
- https://github.com/dotnet/docs-aspire/issues/64
- https://github.com/dotnet/aspire/discussions/3425
This is NOT a solved problem. This is NOT a documented problem.
Please, please, please, write a real end-to-end tutorial that shows how to actually create migrations, not just apply migrations that happen to already exist.
Similar feedback https://github.com/dotnet/aspire/discussions/5474.
Some related articles:
- https://nikiforovall.github.io/dotnet/aspire/2024/06/18/polyglot-persistance-with-aspire.html
- https://fiodar.substack.com/p/using-sql-database-components-in-dotnet-aspire
Feels like we should have a tutorial on how to use various databases with aspire. This would cover:
- The database options
- Databases in containers
- Volumes for data persistence
- Entity framework + aspire