Estoy queriendo usar el MVCMiniProfiler con Dapper. ¿Es esto posible más allá de cerrar la llamada "Query" de dapper en el bloque "Using Profiler.Step"?Dapper con MVCMiniProfiler
que tienen esta llamada Dapper básica:
Dim comments As List(Of Comment)
Using conn = New SqlConnection(ConnectionString)
conn.Open()
comments = conn.Query(Of Comment)("SELECT * from comments where userid = @userid", New With {.userid= 1})
End Using
Los ejemplos MiniProfiler mostrar este
Private Shared _sqlConnection As SqlConnection
Public Shared Function GetOpenConnection() As DbConnection
If _sqlConnection Is Nothing Then
_sqlConnection = New SqlConnection("connection string")
End If
' wrap the connection with a profiling connection that tracks timings
Return MvcMiniProfiler.Data.ProfiledDbConnection.[Get](_sqlConnection, MiniProfiler.Current)
End Function
Dónde estoy atascado está en la aplicación de la "Obtener" en la ProfiledDbConnection. ¿Es posible usar ProfiledDbConnection mientras usas Dapper?