Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sql Server Spatial support #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/// <summary>
/// Get DB command definition
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>StackExchange.Profiling.EntityFramework</RootNamespace>
<AssemblyName>MiniProfiler.EntityFramework</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand Down
2 changes: 1 addition & 1 deletion StackExchange.Profiling/Data/ProfiledDbDataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down