I have done enough research but can't find an answer.
I have an Oracle DB which I am using with my ADO.NET and it is working fine. However, I would like to use it with Entity Framework 6. Since DB is already in place, I am not going to do "Code First" approach. Below are the issues I am having. Please keep them in mind before jumping to a conclusion.
- I have VS 2012 with Old ODP Driver. VS is asking me to upgrade. CANT
- I can't use EDM to generate Diagrams and Code, since I don't have latest ODAC installed and I don't get the option to connect to Oracle DB
- If I try to use the same connection string with EF which is working fine with ADO.NET then I get followig error
ORA-12154: TNS:could not resolve the connect identifier specified
Note I am using LDAP to connect to Oracle DB.
I also tried generating an empty EDM and added a new connection string as followed, then I got a different error.
<add name="EF" connectionString="metadata=res://*/Model1.csdl
|res://*/Model1.ssdl
|res://*/Model1.msl;
provider=Oracle.ManagedDataAccess.Client;
provider connection string="data source=MY_SERVICE;password=MY_PASSWORD;persist security info=True;user id=MY_USERID""
providerName="System.Data.EntityClient" />
The entity type is not part of the model for the current context.
My questions.
- Is there a workaround for above issues.
- Is there a way to Map Oracle TABLES, STORED PROCEDURES, FUNCTIONS etc. manually?
I know above doesn't make much sense but these are the constraints I have. I am trying to Avoid Long/Old ADO.NET code. If it cannot be done then it is fine as well.
Thanks in advance for your input.