小编Noë*_*lin的帖子

EFCore .net6 Cosmos 迁移问题

.NET6 EFCore 和 Cosmos 迁移问题。需要一些帮助。

大家好。我是 .Net 世界的新手,我面临着 Google 未能帮助我解决的问题。你是我最后的问候。

所以。我正在尝试使用 EFCore 6.0.3 从我的小 HomeControlCenter 项目连接到 Azure Cosmos DB

错误:

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 overriding the 'DbContext.OnConfiguring' method or by using 'AddDbContext' on the application service provider. If 'AddDbContext' is used, then also ensure that your DbContext type accepts a DbContextOptions<TContext>
object in its constructor and passes it …
Run Code Online (Sandbox Code Playgroud)

.net c# entity-framework azure-cosmosdb

2
推荐指数
1
解决办法
1774
查看次数

标签 统计

.net ×1

azure-cosmosdb ×1

c# ×1

entity-framework ×1