Skip to main content

ProfiledConnection

Wraps a database connection, allowing sql execution timings to be collected when a ServiceStack.MiniProfiler.Data.IDbProfiler session is started.

Assembly: ServiceStack.Common.dll​
View Source​
Declaration
public class ProfiledConnection : DbConnection, IComponent, IDbConnection, IDisposable, IHasDbConnection

Properties​

InnerConnection​

The underlying, real database connection to your db provider.

View Source​
Declaration
public DbConnection InnerConnection { get; protected set; }

DbConnection​

View Source​
Declaration
public IDbConnection DbConnection { get; }

Profiler​

The current profiler instance; could be null.

View Source​
Declaration
public IDbProfiler Profiler { get; protected set; }

WrappedConnection​

The raw connection this is wrapping

View Source​
Declaration
public DbConnection WrappedConnection { get; }

CanRaiseEvents​

View Source​
Declaration
protected override bool CanRaiseEvents { get; }

ConnectionString​

View Source​
Declaration
public override string ConnectionString { get; set; }

ConnectionTimeout​

View Source​
Declaration
public override int ConnectionTimeout { get; }

Database​

View Source​
Declaration
public override string Database { get; }

DataSource​

View Source​
Declaration
public override string DataSource { get; }

ServerVersion​

View Source​
Declaration
public override string ServerVersion { get; }

State​

View Source​
Declaration
public override ConnectionState State { get; }

AutoDisposeConnection​

View Source​
Declaration
protected bool AutoDisposeConnection { get; set; }

Methods​

ChangeDatabase(String)​

View Source​
Declaration
public override void ChangeDatabase(string databaseName)
Parameters​
TypeName
System.StringdatabaseName

Close()​

View Source​
Declaration
public override void Close()

GetSchema()​

View Source​
Declaration
public override DataTable GetSchema()
Returns​

System.Data.DataTable

GetSchema(String)​

View Source​
Declaration
public override DataTable GetSchema(string collectionName)
Returns​

System.Data.DataTable

Parameters​
TypeName
System.StringcollectionName

GetSchema(String, String[])​

View Source​
Declaration
public override DataTable GetSchema(string collectionName, string[] restrictionValues)
Returns​

System.Data.DataTable

Parameters​
TypeName
System.StringcollectionName
System.String[]restrictionValues

Open()​

View Source​
Declaration
public override void Open()

BeginDbTransaction(IsolationLevel)​

View Source​
Declaration
protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel)
Returns​

System.Data.Common.DbTransaction

Parameters​
TypeName
System.Data.IsolationLevelisolationLevel

CreateDbCommand()​

View Source​
Declaration
protected override DbCommand CreateDbCommand()
Returns​

System.Data.Common.DbCommand

Dispose(Boolean)​

View Source​
Declaration
protected override void Dispose(bool disposing)
Parameters​
TypeName
System.Booleandisposing

Implements​