Glimpse/Glimpse — pull request #350 by MisinformedDNA (2013-05-17 20:49:53+00:00)
Title: Added WebActivator dependency for Glimpse.ADO

This addresses the issue https://github.com/Glimpse/Glimpse/issues/321, but not without cost. If MiniProfiler is also plugged into Glimpse, then an error will occur the first time the DB is accessed. It must be an ordering thing, which isn't controllable with WebActivator.

However, based on the error, we might be able to solve this by making GlimpseDbCommand inherit from ICloneable. (See https://github.com/SamSaffron/MiniProfiler/blob/master/StackExchange.Profiling/Data/ProfiledDbCommand.cs) I see that SqlCommand also inherits from IClonable, so I don't see a problem, but I figured this was worth some discussion before moving forward.

Thoughts?

> [NotSupportedException: Underlying GlimpseDbCommand is not cloneable]
StackExchange.Profiling.Data.ProfiledDbCommand.Clone() in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:378
StackExchange.Profiling.Data.ProfiledDbCommand.System.ICloneable.Clone() in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:390
System.Data.Common.DbCommandDefinition.CreateCommandDefinition(DbCommand prototype) +81
System.Data.Common.DbProviderServices.CreateCommandDefinition(DbCommand prototype) +6
Glimpse.EF.AlternateType.GlimpseDbProviderServices.CreateCommandDefinition(DbCommand prototype) +67
StackExchange.Profiling.Data.ProfiledDbProviderServices.CreateCommandDefinition(DbCommand prototype) in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling.EntityFramework\ProfiledDbProviderServices.cs:39
StackExchange.Profiling.Data.ProfiledDbProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree) in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling.EntityFramework\ProfiledDbProviderServices.cs:81
System.Data.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree) +125
System.Data.EntityClient.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree) +442