EF Code first from database (oracle) - no tables or views RRS feed

  • Question

  • I have a connection string to an Oracle database that says is connected when tested. The connection string does not seem to have a place to enter the name of the database and when I look for the tables in Server Explorer it does not show any (unlike my connections to SQL Server databases).

    When I use the add class/ADO.NET Entity Data Model wizard and select the following

    1. Select Code First from database
    2. Select the appropriate connection string with the radio button for include sensitive data selected

    I get an empty choice for tables & views, but it does think it's connected. I'm not entirely surprised by this since the connection string does not seem to have a place to enter the name of the database.

    I can get at the Oracle tables using an OracleDataAdapter, but first I need to run an alter query with the database schema (i.e. the database name).

    My question is - How do I include the name of the database in the connection string so that I can see the tables in Server Explorer, and hence in the wizard?

    Friday, February 17, 2017 3:11 PM

All replies

  • Which version of Visual Studio and EF are you using? I would suspect that you may need Oracle EF libraries and tools from Oracle.

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Friday, February 17, 2017 3:51 PM
  • Hi Ron Su,

    The following link provide a complete demo about entity framework 6 with oracle. please expand code first and check the four steps.

    Please check the fourth step, when you need to see the tables in Server Explorer, you need to install and configure Oracle Developer Tools for Visual Studio.


    If you have related issue about entity framework with oracle, you could also post your issue on the forum for suitable support.


    Best regards,

    Cole Wu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 20, 2017 2:48 AM