Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

How to remove quotes in sql-code which is generated by Entity Framework? I use .NET 4.0, Oracle 11, Ef 5

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

Entity Framework generate sql code:

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

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

like image 710
drlivsi Avatar asked Apr 14 '14 01:04

drlivsi


1 Answers

Quotes just enforce case-sensitive naming in Oracle SQL.

All you need here is to use correct case for schema, table and column names and it should work!

like image 50
stop-cran Avatar answered Sep 22 '22 18:09

stop-cran