0 Replies Latest reply: Sep 23, 2013 3:03 AM by user12246692 RSS

    [Entity Framework 4] Problem with double quotes and case sensitive query


      Hi guys,


      i'm using ODP.NET with .Net Framework 4.0 and Oracle Client I have a small table, called Login with only one column, IdLogin, and i have mapped an Entity to it. The problem is that ODP.NET transalte my Entity SQL (or my LINQ to Entities) queries in this way:


      var p = from c in context.Login

      where c.IdLogin == 1

      select new { IdLogin = c.IdLogin };


      is translated in



      1 AS "C1",

      CAST( "Extent1"."IdLogin" AS number(10,0)) AS "C2"

      FROM "YOURSCHEMA"."Login" "Extent1"

      WHERE (1 = ( CAST( "Extent1"."IdLogin" AS number(10,0))))


      Note that there are double quotes around both the column name and the table name, causing the following error:


      "ORA-00942: table or view does not exist"


      If i'm not wrong (i'm a novice), it depends on the double quotes that force Oracle to do a case sensitive query. Supposing that i can't change my entity (the main database is SQL Server, and i change only the ssdl to support Oracle, as described in this article Moses' Blog | Multiple database support with Entity Framework), is there any way to tell ODP.NET to not to use double quotes? A configuration option in the DbContext or in the connection string for example?


      Thank you in advance.


      Best regards,