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
Null parameters of C# decimal? type cause NullReferenceException #315
Comments
Thanks for the report! Fixed for the next release in fb4b1a9, it'll be up on MyGet shortly. |
I just hit this in the latest version on NuGet (4.0.133). Since it's in the latest, is there any chance of getting a new package up with this fix? |
@robertmiles3 absolutely - have a stack trace by chance? |
Going to close this out since latest should have all the fixes...if anyone's hitting it in 4.0.138 a repro would be super helpful! |
In our project, we are using Dapper for SqlServer database and MiniProfiler.
After upgrading to MiniProfiler 4.0.133, following sample code (assuming the stored procedure has all respective parameters that accept NULL values):
throws NullReferenceException:
If we remove the decimal? parameter, the query works OK. The MiniProfiler version 4.0.0 has no issues with decimal? parameters.
I believe the issue has been introduced in the dotnet/src/MiniProfiler.Shared/SqlFormatters/SqlServerFormatter.cs commit "SQL formatting for numeric types" on Jun 12, 2018
The text was updated successfully, but these errors were encountered: