3 Replies Latest reply: Feb 15, 2012 2:06 PM by Christian.Shay -Oracle RSS

    Enity Framework Code First

    Sergey Barskiy
      I am trying to get the latest provider for EF to work in Code First environment. I got no issue if I build the model through the wizard by pointing it to my DB, but in Code FIrst I cannot connect. Here are my two connection strings:
                <add name="OracleHR"
                     connectionString="DATA SOURCE=localhost:1521/XE;PASSWORD=****;PERSIST SECURITY INFO=True;USER ID=HR;"
                     providerName="Oracle.DataAccess.Client" />

                <add name="Entities"
                     connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=Oracle.DataAccess.Client;provider connection string=&quot;DATA SOURCE=localhost:1521/XE;PASSWORD=****;PERSIST SECURITY INFO=True;USER ID=HR&quot;" providerName="System.Data.EntityClient" />

      My second connection string works fine and I can get the data, but first one fails with "Network Error"

      Suggestions are appreciated.
      Thanks.