I'm trying to use Entity Framework with Model-First on an Oracle database. I have installed ODP.NET and the Oracle Visual Studio Tools from the file ODTwithODAC1120320_32bit.zip
, which is version 11.2.0.3.20
.
I made a small test model, set the connection string to the Oracle DB, changed the code generation templates of the model to Generate Oracle via T4 (TPT).xaml
and SSDLToOracle.tt
. The code generations is working, however the generated SQL is not usable:
CREATE TABLE "dbo"."Entity1Set" (
"Id" UNIQUEIDENTIFIER NOT NULL,
"NvarcharProperty" NVARCHAR(MAX) NOT NULL
);
Neither UNIQUEIDENTIFIER
nor NVARCHAR
are valid Oracle keywords. Furthermore, Oracle handles schemas differently than SQL Server, so the "dbo".
stuff won't work.
How do you usually handle that? Changing the SQL after every code generation?
Are there other ways to use EF with Oracle and Model-First?