【发布时间】:2011-10-16 03:57:40
【问题描述】:
以下代码的最后一行触发了异常: 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 也是如此。
谢谢:)
【问题讨论】:
标签: c# oracle database-connection mvc-mini-profiler dbconnection