我正在尝试使用来自https://github.com/SimonH/Simple.Data.Oracle的nuget包将Simple.Data与Oracle Managed Provider一起使用。
我有以下代码:
var db = Database.OpenNamedConnection("ManagedOdpOracle");
db.Open();
app.config中的条目如下:
<add name="ManagedOdpOracle" connectionString="Data Source=ora11;User id=User;Password=pwd" providerName="Oracle.ManagedDataAccess.Client" />
每次出现异常时我都无法正常工作:
System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
----> System.ArgumentOutOfRangeException : Specified argument was out of the range of valid values.
Parameter name: connectionName
任何想法我做错了什么?