diff --git a/StackExchange.Profiling.EntityFramework/ProfiledDbProviderServices.cs b/StackExchange.Profiling.EntityFramework/ProfiledDbProviderServices.cs
index 55e6b77..3c00e8c 100644
--- a/StackExchange.Profiling.EntityFramework/ProfiledDbProviderServices.cs
+++ b/StackExchange.Profiling.EntityFramework/ProfiledDbProviderServices.cs
@@ -66,6 +66,25 @@ protected override bool DbDatabaseExists(DbConnection connection, int? commandTi
return wrapped.DatabaseExists(GetRealConnection(connection), commandTimeout, storeItemCollection);
}
+ protected override System.Data.Spatial.DbSpatialServices DbGetSpatialServices(string manifestToken)
+ {
+ return wrapped.GetSpatialServices(manifestToken);
+ }
+ protected override System.Data.Spatial.DbSpatialDataReader GetDbSpatialDataReader(DbDataReader fromReader, string manifestToken)
+ {
+ return wrapped.GetSpatialDataReader(GetRealDataReader(fromReader), manifestToken);
+ }
+
+ private static DbDataReader GetRealDataReader(DbDataReader reader)
+ {
+ var profiled = reader as ProfiledDbDataReader;
+ if (profiled != null)
+ {
+ reader = profiled.WrappedReader;
+ }
+ return reader;
+ }
+
///
/// Get DB command definition
///
diff --git a/StackExchange.Profiling.EntityFramework/StackExchange.Profiling.EntityFramework.csproj b/StackExchange.Profiling.EntityFramework/StackExchange.Profiling.EntityFramework.csproj
index 7a84f25..6af3ff5 100644
--- a/StackExchange.Profiling.EntityFramework/StackExchange.Profiling.EntityFramework.csproj
+++ b/StackExchange.Profiling.EntityFramework/StackExchange.Profiling.EntityFramework.csproj
@@ -10,7 +10,7 @@
Properties
StackExchange.Profiling.EntityFramework
MiniProfiler.EntityFramework
- v4.0
+ v4.5
512
diff --git a/StackExchange.Profiling/Data/ProfiledDbDataReader.cs b/StackExchange.Profiling/Data/ProfiledDbDataReader.cs
index 4cb1bbb..50854ea 100644
--- a/StackExchange.Profiling/Data/ProfiledDbDataReader.cs
+++ b/StackExchange.Profiling/Data/ProfiledDbDataReader.cs
@@ -13,7 +13,7 @@ public class ProfiledDbDataReader : DbDataReader
private DbConnection _conn;
private DbDataReader _reader;
private IDbProfiler _profiler;
-
+ public DbDataReader WrappedReader { get { return _reader; } }
public ProfiledDbDataReader(DbDataReader reader, DbConnection connection, IDbProfiler profiler)
{