Parameters in Dapper reported as errors in JetBrains Rider

I'm just getting used to using Rider full time (long time VS user). I've got warnings and errors set the way I like except for one last issue.

I use Dapper and have something like the following:

connection.Execute("DELETE FROM RACBoardProfile WHERE Id = @Id", new { profile.Id }, transaction);

Rider reports @acronym as an error. acronym is a parameter to the function and is passed into the SQL with the Dapper syntax of providing parameters at the end of the function call. I know it appears as a SQL INJECTION error, but this is obviously valid in Dapper. Even though all of these are reported as errors when viewing the file, it does not show any errors in the solution-wide analysis indicator at the bottom right of the status bar. That shows a green circle with a check. The project builds and works just fine. It is just disconcerting to open a file and see 119 errors!

I'm not sure how to target this inspection. I've been through settings, but it gets pretty deep in there. :) I haven't found the magic one yet.

Thanks for any help!

4 comments
Comment actions Permalink

Hello, it looks like you have faced a known issue: RIDER-24528, it is already fixed now, the fix should be included in the nearest Rider 21.3 EAP, could you please check it once it is released and let me know how it goes?

0
Comment actions Permalink

Sorry, I haven't checked back on this for a while. It looks like the problem still persists for me. 

Just for giggles, I put in new { Id = profile.Id } to see if it just wasn't reading the property but the error remains for @Id and Rider does show that the Id = is not necessary.

My version info (copied from about screen):

JetBrains Rider 2021.2.2
Build #RD-212.5284.64, built on October 8, 2021
Licensed to Trent Grandey
Subscription is active until January 24, 2022.
Runtime version: 11.0.12+7-b1504.28 amd64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
.NET Framework 4.0.30319.42000
GC: G1 Young Generation, G1 Old Generation
Memory: 1500M
Cores: 8
Registry: debugger.new.debug.tool.window.view=true, ide.tree.horizontal.default.autoscrolling=false, ide.tooltip.showAllSeverities=true, ide.mac.bigsur.alerts.enabled=TRUE, show.diff.preview.as.editor.tab.with.single.click=true, ea.enable.developers.list=false, parameter.info.max.visible.rows=10, ide.win.file.chooser.native=true, ide.mac.file.chooser.native=TRUE, search.everywhere.pattern.checking=false, ide.mac.bigsur.window.with.tabs.enabled=false, performance.watcher.sampling.interval.ms=200, ide.borderless.tab.caption.in.title=false, awt.file.dialog.enable.filter=FALSE, debugger.show.values.use.inlays=TRUE, light.edit.file.open.enabled=false, performance.watcher.unresponsive.interval.ms=1000, vcs.enable.add.ignored.directories.to.exclude=false, ide.allow.merge.buttons=TRUE, search.everywhere.settings=true, use.winp.for.graceful.process.termination=FALSE, ide.tooltip.initialDelay=0, ide.require.transaction.for.model.changes=false, ide.debug.in.title=true, rdclient.asyncActions=false
Non-Bundled Plugins: com.microsoft.vso.idea (1.161.2)

0
Comment actions Permalink

DotNetCoderDFW, the fix is included to 21.3 since the EAP 1, you have specified that you are using 21.2.2. 

0
Comment actions Permalink

I didn't notice the EAP in your response! I have installed EAP7 and now EAP8. It looks like the issue is working correctly now for Query, but not for Execute. See the below snippet.

This is the version info:

JetBrains Rider 2021.3 EAP 8
Build #RD-213.5744.78, built on November 13, 2021
Rider EAP User
Expiration date: December 13, 2021
Runtime version: 11.0.13+7-b1751.19 amd64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
.NET Framework 4.0.30319.42000
GC: G1 Young Generation, G1 Old Generation
Memory: 1500M
Cores: 8
Registry:
ide.mac.bigsur.window.with.tabs.enabled=false
debugger.show.values.use.inlays=false
rdclient.asyncActions=false
indexing.enable.entity.provider.based.indexing=false
ide.new.project.model.index.case.sensitivity=true

Non-Bundled Plugins:
com.microsoft.vso.idea (1.162.0)

0

Please sign in to leave a comment.