Exemple #1
0
 internal IDbConnection GetConnection()
 {
     string connectionString = Config.GetConnectionString("SqlServerConnectionString");
     DbConnection connection = new SqlConnection(connectionString);
     RichErrorDbConnection profiled = new RichErrorDbConnection(connection, MiniProfiler.Current); // wraps MiniProfiler's ProfiledDbConnection.
     connections.Add(profiled);
     return profiled;
 }
 private IDbConnection InstanceDbConnection()
 {
     string connectionString = Config.GetConnectionString("SqlServerConnectionString");
     DbConnection connection = new SqlConnection(connectionString);
     RichErrorDbConnection profiled = new RichErrorDbConnection(connection, MiniProfiler.Current); // wraps MiniProfiler's ProfiledDbConnection.
     return profiled;
 }