Describe the bug
When using SqlConnection and querying data using the built-in MSSQL-function DATEADD parameter datepart is falsely identified as a table column causing a false DAP226 warning when used in a query with joins.
Dapper.Advisor: 1.0.10
To Reproduce
// DAP226: FROM expressions with multiple elements should qualify all columns; it is unclear where 'YEAR' is located
public static async Task DateAddWithJoin(SqlConnection connection) =>
await connection.QueryAsync(
"""
SELECT DATEADD(YEAR, 1, t.Year) AS NextYear
FROM MyTable t
JOIN MyOtherTable o ON o.Id = t.Id
"""
);
Describe the bug When using
SqlConnection
and querying data using the built-in MSSQL-functionDATEADD
parameterdatepart
is falsely identified as a table column causing a falseDAP226
warning when used in a query with joins.Dapper.Advisor: 1.0.10
To Reproduce