C# – Oracle Entity Framework – Generate Entity From Tables in Different Schema

centity-frameworkoracle

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.

Best 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: https://forums.oracle.com/forums/thread.jspa?threadID=2291628&tstart=0

I hope help you with this.

Cesar.