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

Unclear or missing directions on EF migrations in Aspire #1664

Open
TheLever opened this issue Sep 22, 2024 · 0 comments
Open

Unclear or missing directions on EF migrations in Aspire #1664

TheLever opened this issue Sep 22, 2024 · 0 comments
Labels
⌚ Not Triaged Not triaged

Comments

@TheLever
Copy link

TheLever commented Sep 22, 2024

Clear documentation needed

I am searching for directions on how to add migrations to an aspire solution consisting of several services and a couple of different databases. I have seen several solutions and all of them fail presently with a missing database provider when attempting to add the migration using the CLI.

I have seen several of sample code provided, some add the migrations to the migration service, some to the library that has the context. I have also seen a comment indicating that the missing database provider could tricked by adding a dummy connection string in an appsettings.json, but it is not entirely clear where that should be put (tried it in both the app host and in the service consuming the database context).

Would it be possible to create some clear documentation which illustrates how this is solved?

This used to work for me as I have an Aspire app which makes use of migrations, and uses the migration service taken from the samples. There used to be an article describing step by step what to do (like in the Package Manager console, select this startup project etc), but I can't seem to find it again.

@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌚ Not Triaged Not triaged
Projects
None yet
Development

No branches or pull requests

2 participants