I have Windows 7 x64, Visual Studio 2012 with "ODAC 11.2 Release 5 and Oracle Developer Tools for Visual Studio (11.2.0.3.20)." Then I connected to Oracle db, creating the .edmx model. But when I try to use EF to manage some data
var ent = new Entities(); var res = ent.table1.ToList();
An error has occurred.
Schema specified is not valid. Errors: Model.ssdl(2,2) : error 0152: No Entity Framework provider found for 'Oracle.DataAccess.Client' ADO.NET provider. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.
I checked my AppConfig, all sections are in order. Also I set ODAC1120320Xcopy_x64 (and added environment variables too). But nothing changes.
If I do this, everything works great
EntityConnection econn = new EntityConnection("name=Entities"); econn.Open(); EntityCommand ecmd = econn.CreateCommand(); ecmd.CommandText = "SELECT e.NAME FROM Entities.table1 as e"; EntityDataReader ereader = ecmd.ExecuteReader(CommandBehavior.SequentialAccess); while (ereader.Read()) { ... }
Do you have any ideas? We will be very grateful for any help.
Alex zaitzev
source share