Generate Entity From Tables in Different Schemas in Oracle Entity Framework

c# entity-framework oracle


I log into Oracle using my own user account, which we can call my_account, and I am granted select privileges on all of the tables in the schema that our application uses, which I will call app_schema.

I would like to use Entity Manager to generate the entity definitions for the tables in the app_schema schema, but I do not have the password for that account and likely won't be given it, so I must log in as my_account.

When I run the wizard I can only see the tables in the my_account schema. Is there any way to get the tables from a different schema so that I can generate those? This is a massive database, so writing the .edmx file by hand could take days, and will probably result in tons of typo-induced errors. I have attempted to use synonyms, but they are not visible in the wizard either.

9/14/2011 8:00:17 PM

Accepted Answer

In your Server explorer, select your connection and right. Click on filters tab, select Displayed schemas, then add more schemas from your schemas list. Remember click on update button and Ok to save changes on your connection.

Now when you add a new ADO.Net Entity Data Model you will see all tables from your schemas.

Please visit this link:

I hope help you with this.


9/29/2011 1:54:16 PM

Popular Answer

I am using EF 4.2 and found that I was able to use tables from another user/schema only when creating a new connection (using my_account) and using a filter when going through the Entity Data Model Wizard. Add app_schema to the Displayed Schemas filter (be sure to press Update).

Like CMarchan suggests, if I set the filter on the connection in the server explorer, it works for me there, but the EDM wizard does not see the connection when creating a new model (maybe just a "feature" in 4.2).

Once the EDM is created, it does allow me to add/edit tables from app_schema.

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow