You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "Apply migrations at runtime" section contains code but doesn't say where in your app to put it. I found the answer at https://stackoverflow.com/a/38263675, but it would be nice if the article mentioned where this code should be placed within your app :)
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 6e28b0a8-b7e4-4c07-9e60-0df403bbee28
Version Independent ID: 12300b31-6f7b-b75c-970d-693365e77013
If you understand the security risks of using a connection string with permissions to alter the database schema and you understand problems that can occur when multiple instances of your app try to migrate the database at the same time...
You can do it in Program.Main. If you're using Microsoft.Extensions.Hosting, it would look like this:
The "Apply migrations at runtime" section contains code but doesn't say where in your app to put it. I found the answer at https://stackoverflow.com/a/38263675, but it would be nice if the article mentioned where this code should be placed within your app :)
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: