efcore / EFCore.NamingConventions

Entity Framework Core plugin to apply naming conventions to table and column names (e.g. snake_case)
Apache License 2.0
715 stars 73 forks source link

Not working with Oracle #273

Open michelevirgilio opened 5 months ago

michelevirgilio commented 5 months ago

Microsoft.EntityFrameworkCore 8.0.3 Oracle.EntityFrameworkCore 8.21.121 EFCore.NamingConventions latest clone

Hi, i'm trying to use the extension in my solution with a Oracle connection. I've added the EFCore.NamingConventions project reference inside my solution and used this code:

              builder.Services.AddDbContext<MyOracleContext>(options => 
                {
                    options.UseOracle(connectionString);
                    options.LogTo(Console.WriteLine);
                    options.UseUpperCaseNamingConvention();
                });

i can see the hit during debug of the method

    public string RewriteName(string name)
        => name.ToUpper(_culture);

of UpperCaseNameRewriter

but the materialized query still have no uppercase names. Maybe i'm missing some settings? Thanks

michelevirgilio commented 2 months ago

Any help?

roji commented 2 months ago

@michelevirgilio it's hard to help without a minimal, runnable code sample - the above is just a snippet... I also don't have Oracle installed, so I'd suggest trying to temporarily switch to a different database provider (e.g. SQLite/SQL Server/PostgreSQL) just to check; if the problem persists there (as I suspect it will), that's something I can investigate much more easily (though I'd still need a minimal code sample. If it doesn't reproduce, then there's something in the Oracle EF provider that's causing the issue and it would have to be investigated in that context.