Asp.net EF6、MVC5和Oracle数据库
首先,我想为我的英语错误道歉,我是法国人 我需要帮助,因为我从几天前就被阻止了,我正在尝试启动我的web应用程序。我解释说,我正在开发一个新的网络应用程序。此应用程序的制作如下图所示: 我有1个解决方案,包含2个项目,首先,_DLL项目是库类项目,它连接到Oracle数据库 这个数据库连接正确,我可以先生成实体来创建数据库 该大学网站包含一个MVC设计模式,实际上没有什么特别之处 历史记录: 我在VS 2015上创建了此解决方案,并尝试使用entity framework 6.1.3。这安装在两个项目上 在_DLL项目中,对照对ODT Oracle、Oracle.ManagedDataAccess和Oracle.ManagedDataAccess.EntityFramework的引用。 安装的ODT版本是12.1.0.2.4(最后一个版本,10月5日发布,规则与VisualStudio 2015) 按照这个步骤,我创建了一个EDMX,基于我的标签名:“Pilier”,只是为了尝试连接,如果一切正常 之后,我在我的网站项目中添加对:_DLL项目的引用。下一步,géné使用EF 6对视图中的MVC进行评分 实际上 App.config(\u DLL项目)Asp.net EF6、MVC5和Oracle数据库,asp.net,.net,oracle,entity-framework,Asp.net,.net,Oracle,Entity Framework,首先,我想为我的英语错误道歉,我是法国人 我需要帮助,因为我从几天前就被阻止了,我正在尝试启动我的web应用程序。我解释说,我正在开发一个新的网络应用程序。此应用程序的制作如下图所示: 我有1个解决方案,包含2个项目,首先,_DLL项目是库类项目,它连接到Oracle数据库 这个数据库连接正确,我可以先生成实体来创建数据库 该大学网站包含一个MVC设计模式,实际上没有什么特别之处 历史记录: 我在VS 2015上创建了此解决方案,并尝试使用entity framework 6.1.3。这安装在两
了解更多信息*
我发现一些人有问题,但没有一个解决方案的目的在不同的网站上,请允许我继续…有人可以帮助我吗?。
谢谢。配置是从您的Web.config
文件加载的。dll项目文件上的App.config
文件将被忽略,在您的特定情况下,解决方案可以简单地添加:
到您的Web.config
文件。您的连接字符串和其他相关配置项也需要出现在Web.config
文件中,而不是dll项目的App.config
文件中。没有人?不清楚?
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<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" />
</configSections>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</providers>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<publisherPolicy apply="no" />
<assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
<bindingRedirect oldVersion="4.121.0.0 - 4.65535.65535.65535" newVersion="4.121.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<connectionStrings>
<add name="Entities" connectionString="metadata=res://*/EntityModel.csdl|res://*/EntityModel.ssdl|res://*/EntityModel.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string="DATA SOURCE=****;PASSWORD=*******;PERSIST SECURITY INFO=True;USER ID=SAGEX"" providerName="System.Data.EntityClient" />
</connectionStrings>
<system.data>
<DbProviderFactories>
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</DbProviderFactories>
</system.data>
<oracle.manageddataaccess.client>
<version number="4.121.1.0">
<settings>
<setting name="AGPD" value="C:\app\client\uadmin\product\12.1.0\client_2\Network\Admin" />
</settings>
</version>
</oracle.manageddataaccess.client>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<!--
Pour plus d’informations sur la configuration de votre application ASP.NET, rendez-vous sur
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<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" />
</configSections>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" />
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.webServer>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
<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="Entities" connectionString="metadata=res://*/EntityModel.csdl|res://*/EntityModel.ssdl|res://*/EntityModel.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string="DATA SOURCE=*****;PASSWORD=*******;PERSIST SECURITY INFO=True;USER ID=SAGEX"" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>