Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for NHibernate v5 #9

Open
Korayem opened this issue Jun 24, 2018 · 2 comments
Open

Support for NHibernate v5 #9

Korayem opened this issue Jun 24, 2018 · 2 comments

Comments

@Korayem
Copy link

Korayem commented Jun 24, 2018

This library fails to run with latest NHibernate v5

@AyuDevs
Copy link

AyuDevs commented Apr 22, 2021

Hello,
I made a solution that works for Miniprofiler 3.0.10 , MVC 4 and NHibernate 5.1.

It would be nice to include it in the nuget package, but for all of those who cannot wait and would like a solution NOW, here it is.

I created a new MiniProfilerSql2008ClientDriver that uses DBCommand instead of IDBCommand. I also added the missing methods but without any implemention since we didn't need them.

Most of the code is from the original nuget package and I still do reference the original nuget package in the rest of the code. Just correct the driver to the new MiniProfilerSql2008ClientDriver in your code (bootstrapper or wherever). The attached file is in reality a .cs file, so just change the ending from .txt to .cs.

MiniProfilerSql2008ClientDriver.txt

@AyuDevs
Copy link

AyuDevs commented Apr 27, 2021

Hello,

Here is a solution for Miniprofiler 3.0.10, MVC 4 and NHibernate 5.2.

VerifyOutcomeBatched(int expectedRowCount, int rowCount) becomes obsolete in version 5.2, so I used VerifyOutcomeBatched(int expectedRowCount, int rowCount, DbCommand statement) instead.

MiniProfilerSql2008ClientDriver (2).txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants