Skip to content

Conversation

@Sc7-git
Copy link
Contributor

@Sc7-git Sc7-git commented Apr 21, 2021

An error is reported when executing the migration command:
Unable to create an object of type'ApplicationDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728

The entry point of dbcontext design is Program.CreateHostBuilder(), but the Program class does not have a CreateHostBuilder function.

Reference: https://docs.microsoft.com/en-us/ef/core/cli/dbcontext-creation?tabs=vs#from-application-services

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

PR Title
Summary of the changes (Less than 80 chars)

PR Description
Detail 1
Detail 2

Addresses #bugnumber (in this specific format)

An error is reported when executing the migration command:
Unable to create an object of type'ApplicationDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728

The entry point of dbcontext design is Program.CreateHostBuilder(), but the Program class does not have a CreateHostBuilder function.

Reference: https://docs.microsoft.com/en-us/ef/core/cli/dbcontext-creation?tabs=vs#from-application-services
@ghost ghost added area-identity Includes: Identity and providers community-contribution Indicates that the PR has been added by a community member labels Apr 21, 2021
@Sc7-git
Copy link
Contributor Author

Sc7-git commented Apr 21, 2021

An error is reported when executing the migration command

@ghost
Copy link

ghost commented Apr 21, 2021

Hello @pranavkm!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@pranavkm pranavkm added this to the 6.0-preview5 milestone Apr 21, 2021
@ghost ghost merged commit 5ab47f3 into dotnet:main Apr 21, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-identity Includes: Identity and providers community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants