以下代码的最后一行触发了异常:OracleConnection conn = new OracleConnection(getConnectionString());
// A SqlConnection, SqliteConnection ... or whatever
// wrap the connection with a profiling connection that tracks timings
var cnn = MvcMiniProfiler.Data.ProfiledDbConnection.Get(conn, MiniProfiler.Current);
OracleCommand cmd = new OracleCommand(sql, (OracleConnection) cnn);
这是:
Unable to cast object of type 'MvcMiniProfiler.Data.ProfiledDbConnection' to type 'Oracle.DataAccess.Client.OracleConnection'.
我正在使用 Oracle 数据提供程序。用于 oracle 的 devArt 也是如此。
谢谢 :)