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
If a class implementing this interface is found in either the same project as the derived DbContext or in the application's startup project, the tools bypass the other ways of creating the DbContext and use the design-time factory instead.
However, I see in my dotnet ef migrations add InitialCreate logs that there is a warning first from trying the DI approach, and only then a successful message after using the design-time factory:
dotnet ef migrations add InitialCreate --context BloggingDbContext
Build started...
Build succeeded.
An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: (One of my errors during DI startup because of no config given).
Done. To undo this action, use 'ef migrations remove'
Type of issue
Other (describe below)
Description
Section "From a design-time factory" states:
However, I see in my
dotnet ef migrations add InitialCreate
logs that there is a warning first from trying the DI approach, and only then a successful message after using the design-time factory:This answer on StackOverflow also notes that:
My setup was:
Page URL
https://learn.microsoft.com/en-us/ef/core/cli/dbcontext-creation?tabs=dotnet-core-cli
Content source URL
https://github.com/dotnet/EntityFramework.Docs/blob/main/entity-framework/core/cli/dbcontext-creation.md
Document Version Independent Id
d988e806-cb86-19f5-7f76-6ce3bfcd94ed
Article author
@bricelam
The text was updated successfully, but these errors were encountered: