小编Fea*_*inn的帖子

使用 Identity Server 4 在 IConfigurationDbContext 上没有 SaveChanges 方法

我正在尝试使用 ef-core 和 dotnet 3.1 创建我自己的 UI 以将 CRUD Identity 客户端插入到 Identity Server 4,但我遇到了一个问题,我的 ConfigurationDbContext 没有 SaveChanges() 方法。

我可以从数据库中读取现有数据没有任何问题,我有 Add() 方法,但奇怪的是 SaveChanges() 方法只是丢失了......

我已按如下方式注入服务。

 private readonly IConfigurationDbContext ConfigurationDbContext;
 private readonly IPersistedGrantDbContext PersistedGrantDbContext;

public ResourceManagementController(
    IConfigurationDbContext configurationDbContext,
    IPersistedGrantDbContext persistedGrantDbContext)
      {
          ConfigurationDbContext = configurationDbContext;
          PersistedGrantDbContext = persistedGrantDbContext;
      }
Run Code Online (Sandbox Code Playgroud)

c# entity-framework-core .net-core asp.net-core identityserver4

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