Hi all,
I am using Identity Server with PostgreSQL. I would like to know if there is a way to change naming convention from Pascal case to snake case?
It's EF Core under the covers -- so the question is can you make that do what you want?
I use this blog post for overriding NpgSQL naming conventions:
https://andrewlock.net/customising-asp-net-core-identity-ef-core-naming-conventions-for-postgresql/
So can I override ConfigurationDbContext's and PersistedGrantDbContext's OnModelCreating method?
I just provided a somewhat simiar example for clustering. You can see if it works for your NpgSQL config:
https://github.com/IdentityServer/IdentityServer4/issues/3770#issuecomment-564327555
When I do that I get the following error:
Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[IdentityServer4.EntityFramework.DbContexts.PersistedGrantDbContext]' while attempting to activate 'MyContext'.
Ah yea, I see. That was more of a copy/paste typo as I tried to write up that comment. Can you try:
public MyDbContext(DbContextOptions<MyDbContext> options, OperationalStoreOptions storeOptions) : base(options, storeOptions)
instead?
I have generated migrations successfully, thanks a lot.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.