I was able to find a previously-listed question about this exact same issue here, but it was never answered. I'm hoping somebody will have an idea of how to handle the problem: Dapper not adding parameters

Any ideas a way to resolve this, or is there a different method for handling parameterization with Dapper that might work?

Expert Answer

Not yet released to NuGet, but the source code now contains support for pseudo-positional parameters. These are implemented by pattern recognition, such that ?abc? in your text maps to the parameter named from member abc, but using positional ? syntax. So if you issue:

where the parameter added is the one from the member marked cwr_genero. This allows the member to be resolved correctly. The special ?foo? pattern is used as the indicator to switch to positional parameters.

Note that individual parameters can only be referenced once per query; the following will not work: