Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

EFCore Migration ERROR in different Project Error

My DbContext(XQTContext) is location in XQT.Core.Repository。
My Web Application nuget Microsoft.EntityFrameworkCore.Tools、Microsoft.EntityFrameworkCore.Design。 packages is 5.0.13

in startup.cs
services.AddDbContext(
options => options.UseSqlServer(_configuration.GetConnectionString("DefaultConnection"), b => b.MigrationsAssembly("XQT.Core"))
);

Notes: Console in XQT.Core
I Execute Add-Migration Init -Project XQT.Core.Repository,but error is

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: An error occurred while updating the entries. See the inner exception for details.
Unable to create an object of type ‘XQTContext’. For the different patterns supported at design time,

thanks

>Solution :

Perhaps this is the issue you are looking for a solution to your problem.

Related topic

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading