Closed pmccowat closed 12 months ago
That's weird - we explicitly consider table variables, and have tests for it. I'll check, though.
right; so this only happens in the fallback case i.e. when the connection type is not SqlConnection
; if it knows you're using TSQL, this is not an issue - it uses the advanced TSQL parser and applies (much) more logic.
If you're using DapperAOT there is also a hint to specify this; I am going to improve the message and add a csproj-level configuration to opt in to TSQL
In this case, I was using DbConnection
from EF6
_context.Database.Connection.QueryAsync
OK, I've updated the rule to include a help link that explains a bunch:
That link goes here
I'm going to close this one and re-open a new ticket to support project level SQL syntax specification
In a few Dapper SQL queries, I have query level parameters which are used as variables inside the query scope and don't require any values to be passed in as arguments to the Dapper in methods like QueryAsync.
This is raising the error DAP019 SQL parameters were detected, but no parameters are being supplied