Generic ConfigurationDbContext And PersistedGrantDbContext #132
Replies: 4 comments 6 replies
-
Related: https://github.com/orgs/DuendeSoftware/discussions/87#discussioncomment-12543611 |
Beta Was this translation helpful? Give feedback.
-
Can you please let us know the specifics on what you're trying to achieve? What kind of properties and custom capabilities? |
Beta Was this translation helpful? Give feedback.
-
Our Entity Framework implementation could be seen as an example on how to implement the store interfaces in Duende IdentityServer that happens to be sufficient for many scenarios when not too much customization is needed. There however is the EF customization support which I pointed out in my earlier comment and there's also the possibility to use the generic extension methods that register the contexts that enable you to use your own DbContexts instead of the ones in the package. Using this method however requires you to use the exact scheme the existing DbContexts have but you would be able to add your own properties to the entities. If even more customization is needed: there's the stores abstraction layer. Instead of looking at the level of the DbContext for customization you can look at the store interfaces which are fairly easy to implement. Please take a look at how they are implemented in the Entity Framework package and you'll see what I mean. |
Beta Was this translation helpful? Give feedback.
-
But the properties within the database still need to exists which is where the changes to the dbcontext are necessary. You have many examples of implementations with your templates but extending to accommodate multiple database models is still a challenge for many and put yourselves at a disadvantage against your rivals. The implementation I have shouldn't break your existing standard implementation, as the entities are your base entities but will provide a your consumers more advanced capabilities when needed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
IdentityServer version
v7
.NET version
.net 9
Description
Current implementation of DBContext aren't generic and make it difficult to extend with new properties or custom capabilities. Microsoft ApplicationUser has this capability, there should be no reason why Duende can't follow suite.
Reproduction steps
No response
Expected behavior
No response
Logs
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions