protected override IDbCommand GetDbCommand(string key, IDbTransaction transaction)
{
if (transaction == null)
{
return base.GetDbCommand(key);
}
return new SqlCommand { Connection = transaction.Connection, Transaction = transaction };
}
尝试编译上述代码时出现以下错误。
无法将类型“System.Data.IDbConnection”隐式转换为“System.Data.SqlClient.SqlConnection”。存在显式转换(您是否缺少演员表?)