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
public abstract class DatabaseStorageBase : IStorage
Properties
ConnectionString
How we connect to the database used to save/load MiniProfiler results.
View Source
protected string ConnectionString { get; set; }
Methods
Save(MiniProfiler)
Saves 'profiler' to a database under its ServiceStack.MiniProfiler.MiniProfiler.Id.
View Source
public abstract void Save(MiniProfiler profiler)
Parameters
Type | Name |
---|---|
ServiceStack.MiniProfiler.MiniProfiler | profiler |
Load(Guid)
Returns the MiniProfiler identified by 'id' from the database or null when no MiniProfiler exists under that 'id'.
View Source
public abstract MiniProfiler Load(Guid id)
Returns
ServiceStack.MiniProfiler.MiniProfiler
Parameters
Type | Name |
---|---|
System.Guid | id |
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
public abstract List<Guid> GetUnviewedIds(string user)
Returns
System.Collections.Generic.List<System.Guid>
Parameters
Type | Name | Description |
---|---|---|
System.String | user | User identified by the current MiniProfiler.Settings.UserProvider. |
|
GetConnection()
Returns a DbConnection for your specific provider.
View Source
protected abstract DbConnection GetConnection()
Returns
System.Data.Common.DbConnection
GetOpenConnection()
Returns a DbConnection already opened for execution.
View Source
protected DbConnection GetOpenConnection()
Returns
System.Data.Common.DbConnection