✅ Can you run EF Core migration update at application startup rather than with the CLI tools?

^
5 Replies
Angius
Angius4w ago
Yes
Jimmacle
Jimmacle4w ago
dbContext.Database.MigrateAsync()
nathanAjacobs
nathanAjacobs4w ago
Thanks!!! So I would just call that when configuring services or what?
Jimmacle
Jimmacle4w ago
you'd call it after building the host because you need the DI container to be built to pull the dbcontext out
nathanAjacobs
nathanAjacobs4w ago
Gotcha, awesome!
Want results from more Discord servers?
Add your server