I'm trying to create my own UI to CRUD Identity clients into Identity Server 4 using ef-core and dotnet 3.1 but I have an issue where I my ConfigurationDbContext doesn't have a SaveChanges() method.
I can read existing data from the database no without any issues and I have the Add() method but weirdly the SaveChanges() method is just missing...
I have injected the service as follows.
private readonly IConfigurationDbContext ConfigurationDbContext;
private readonly IPersistedGrantDbContext PersistedGrantDbContext;
public ResourceManagementController(
IConfigurationDbContext configurationDbContext,
IPersistedGrantDbContext persistedGrantDbContext)
{
ConfigurationDbContext = configurationDbContext;
PersistedGrantDbContext = persistedGrantDbContext;
}
Turns out I needed to Inject ConfigurationDbContext rather than IConfigurationDbContext. It seems the SaveChanges Method is Inherited directly from DbContext rather than Via IConfigurationDbContext.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With