我试图使用控制台应用程序执行命令add-migration,除了控制台应用程序之外,我在一个项目中创建了一个上下文,但是当我试图运行它时,它会给出错误,我使用的是.NET 6:
Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Migrations.IMigrator'. This is often because no database provider has been configured for this DbContext. A provider can be configured by