Also make sure you do not wrap parentheses around your query string like so:
SELECT Name from [USER] WHERE [UserId] in (@ids)
I had this cause a SQL Syntax error using Dapper 1.50.2, fixed by removing parentheses
SELECT Name from [USER] WHERE [UserId] in @ids