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
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.