entity framework - How Do I Configure my Web App to Work with Oracle 12c Release 3 (12.1.0.1.0)? -
thanks looking
i have written app uses entity framework 6 supposedly supported oracle info provider 12c r3.
i have installed version of odp, having problem making work. have tried next configuration instructions, yet still error when code tries access oracle entities:
0152: no entity framework provider found ado.net provider invariant name 'oracle.dataaccess.client'.
note: aware there many other stackoverflow questions on subject, of them older , not take consideration newer version of odp back upwards ef 6.
any help appreciated.
i able to utilize odp ef6.
i did next create work :-
first installing odac 12c release 3 includes back upwards entity framework 6 code first , code first migrations; nuget, .net framework 4.5.2; , odp.net, managed driver xml db. per
http://www.oracle.com/technetwork/topics/dotnet/whatsnew/index.html
adding 2 references , project references , :
oracle.manageddataaccess.dll
oracle.manageddataaccess.entityframework.dll
installing ef6.1.1 using nuget running next command in bundle manager console( can come in tools->nuget bundle manager -> bundle manager console):
install-package entityframework -version 6.1.1
and modify web.config or web.config utilize oracle.manageddataaccess , adding provider , valid connection string eg :
<configsections> <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=6.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false" /> <section name="oracle.manageddataaccess.client" type="oracleinternal.common.odpmsectionhandler, oracle.manageddataaccess, version=4.121.2.0, culture=neutral, publickeytoken=89b483f429c47342" /> <!-- more info on entity framework configuration, visit http://go.microsoft.com/fwlink/?linkid=237468 --> </configsections> <entityframework> <contexts> <context type="app.context.default, app.context"> <databaseinitializer type="myproject.context.config.contextinitializer, myproject.context" /> </context> </contexts> <defaultconnectionfactory type="system.data.entity.infrastructure.sqlconnectionfactory, entityframework" /> <providers> <provider invariantname="oracle.manageddataaccess.client" type="oracle.manageddataaccess.entityframework.eforacleproviderservices, oracle.manageddataaccess.entityframework, version=6.121.2.0, culture=neutral, publickeytoken=89b483f429c47342" /> <provider invariantname="system.data.sqlclient" type="system.data.entity.sqlserver.sqlproviderservices, entityframework.sqlserver" /> </providers> </entityframework> <connectionstrings> <add name="default" providername="oracle.manageddataaccess.client" connectionstring="data source=xe;user id=user" /> </connectionstrings>
rebuild application x86, , start using ef6 , can check if works adding model using ado.net entity model using code first
oracle entity-framework ado.net odp.net
No comments:
Post a Comment