docs-aspire icon indicating copy to clipboard operation
docs-aspire copied to clipboard

Please please please write real doc Entity Framework + Postgres Migrations

Open yoDon opened this issue 1 year ago • 2 comments

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.


Associated WorkItem - 478433

yoDon avatar Aug 11 '24 00:08 yoDon

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

davidfowl avatar Aug 29 '24 23:08 davidfowl

Feels like we should have a tutorial on how to use various databases with aspire. This would cover:

  1. The database options
  2. Databases in containers
  3. Volumes for data persistence
  4. Entity framework + aspire

davidfowl avatar Aug 29 '24 23:08 davidfowl