This discussion is archived
3 Replies Latest reply: Jun 27, 2013 8:20 AM by gdarling - oracle RSS

Can't see Oracle Data Provide in EF Wizard

2323c597-206d-48ba-9e59-b412157c710f Newbie
Currently Being Moderated

Hello

I have searched and some information about this issue but could not resolve my problem.

I have Visual Studio 2012 64 bit and 64 Bit ODAC and Can't see Oracle Data Provide in EF Wizard. I can connect my Oracle DB on server explorer.  Do i need to install ODAC developer tool ? I think it is avaible only 32 bit. I have installed but started to get OR-12154error code.

  • 1. Re: Can't see Oracle Data Provide in EF Wizard
    gdarling - oracle Expert
    Currently Being Moderated

    Are you sure vs2012 is 64 bit?  I was under the impression that it was still only 32 bit (even when installed on a 64 bit box).

    visual studio 2012 pro - any 64 bit version on msdn?

     

    Assuming it's 32 bit, you need to have 32 bit ODP/ODT installed.    12154 just means that the client couldn't find the TNSNames.ora entry you specified.  Assuming you added a 32 bit client, you'll need to setup tnsnames.ora in that home as well, as it's unaware of the 64 bit home.

     

    Hope it helps,

    Greg

  • 2. Re: Can't see Oracle Data Provide in EF Wizard
    2323c597-206d-48ba-9e59-b412157c710f Newbie
    Currently Being Moderated

    Thanks for reply.

    I have installed the 32 bit and it started to work but now i have another problem. You can see the full description as below ...

     

     

    I am using:

    • Visual Studio 2012 Ultimate 64 Bit
    • Oracle Db
    • Odac 32 Bit with Developer Tool
    • MVC4 Framework with C#
    • EF version 5.0.0.0

    I can connect my Oracle DB on "Server Explorer" and "ADO.net Entitiy Framework". But i want to usecodefirst approach in my application. After created my Model, i am not able to add new controller. I get the following error.

    Unable to retrieve medatadata for 'MvcMovie.Models.Movie'. Using the same DbCompiledModel to create contexts against deffenrent types of database servers is not supported. Instead, create separate DbCompiledModel for each type of server being used.

    Also you can see my model Movie.cs as below

    using System; using System.Data.Entity;  namespace MvcMovie.Models { public class Movie { public int ID { get; set; } public string Title { get; set; } public DateTime ReleaseDate { get; set; } public string Genre { get; set; } public decimal Price { get; set; } }  public class MovieDBContext : DbContext { public DbSet<Movie> Movies { get; set; } } }

    My webconfig connection string is as below

     <add name="MovieDBContext" connectionString="DATA SOURCE=TEST;PASSWORD=qwe123;PERSIST SECURITY INFO=True;User ID=WEBMASTER" providerName="Oracle.DataAccess.Client" />

    I have tried to change paramaters in the connection string and installed the 64 bit ODAC but not successfull. With 64 bit ODAC i am not able to see Oracle Datasource in the EF Wizard screen. So i back to 32 bit.

    Regards.

  • 3. Re: Can't see Oracle Data Provide in EF Wizard
    gdarling - oracle Expert
    Currently Being Moderated

    I'm not much of an EF kind of guy, but from the readme..

    http://www.oracle.com/technetwork/topics/dotnet/downloads/install112030-1440546.html

    ODAC does not support Code First in this release.


     

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points