How to remove quotes in sql code generated by Entity Framework?

How to remove quotes in sql code generated by Entity Framework? I am using .NET 4.0, Oracle 11 , Ef 5

protected override void OnModelCreating(DbModelBuilder modelBuilder)
{                    
    modelBuilder.Entity<ClassName>().ToTable("TableName", "SchemaName");
}

Entity Framework generates sql code:

SELECT "Extent1"."Field1" AS "Field1"        
FROM "SchemaName"."TableName" "Extent1"

I want to remove the quotes around "SchemaName" because in Oracle I get the error "ORA-00942: table or view does not exist"

+4
source share
2 answers

Quotes simply use case-sensitive naming in Oracle SQL.

All you need to do is use the correct code for the names of schemas, tables and columns, and it should work!

+1
source

, , ;)

0

Source: https://habr.com/ru/post/1536372/


All Articles