This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10961|Reply: 0

[.NET Core] Unable to create an object of type 'xxContext'. Add an implementation of

[Copy link]
Posted on 6/20/2019 5:53:53 PM | | |
NET Core Error Error When Building a New Scaffolding or Performing Database Migration:

Unable to create an object of type xxContext'. Add an implementation of 'IDesignTimeDbContextFactory<xxxContext>' to the project, or seehttps://go.microsoft.com/fwlink/?linkid=851728for additional patterns supported at design time.

Find relevant information, and the solution is as follows:

In the Data folder, create a class named xxContextFactory with the following class code:







Previous:Add-Migration: Cannot bind a parameter to the parameter "Path" because the parameter is:
Next:Option 'trusted_connection' not supported. This anomaly
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com