Skip to main content

DatabaseStorageBase

Understands how to save MiniProfiler results to a MSSQL database, allowing more permanent storage and querying of slow results.

Assembly: ServiceStack.NetFramework.dll
View Source
Declaration
public abstract class DatabaseStorageBase : IStorage

Properties

ConnectionString

How we connect to the database used to save/load MiniProfiler results.

View Source
Declaration
protected string ConnectionString { get; set; }

Methods

Save(MiniProfiler)

Saves 'profiler' to a database under its ServiceStack.MiniProfiler.MiniProfiler.Id.

View Source
Declaration
public abstract void Save(MiniProfiler profiler)
Parameters
TypeName
ServiceStack.MiniProfiler.MiniProfilerprofiler

Load(Guid)

Returns the MiniProfiler identified by 'id' from the database or null when no MiniProfiler exists under that 'id'.

View Source
Declaration
public abstract MiniProfiler Load(Guid id)
Returns

ServiceStack.MiniProfiler.MiniProfiler

Parameters
TypeName
System.Guidid

GetUnviewedIds(String)

Returns a list of ServiceStack.MiniProfiler.MiniProfiler.Ids that haven't been seen by <code data-dev-comment-type="paramref" class="paramref">user</code>.

View Source
Declaration
public abstract List<Guid> GetUnviewedIds(string user)
Returns

System.Collections.Generic.List<System.Guid>

Parameters
TypeNameDescription
System.StringuserUser identified by the current MiniProfiler.Settings.UserProvider.

|

GetConnection()

Returns a DbConnection for your specific provider.

View Source
Declaration
protected abstract DbConnection GetConnection()
Returns

System.Data.Common.DbConnection

GetOpenConnection()

Returns a DbConnection already opened for execution.

View Source
Declaration
protected DbConnection GetOpenConnection()
Returns

System.Data.Common.DbConnection

Implements