I have a weird problem with ExecuteQuery in that it isn't working when performing a parameterized query.
The following returns 1 record:
db.ExecuteQuery<Member>(@"SELECT *
FROM Member
INNER JOIN aspnet_Users ON Member.user_id = aspnet_Users.UserId
WHERE [aspnet_Users].[UserName] = 'Marina2'");
However, the parameterized version returns no results:
db.ExecuteQuery<Member>(@"SELECT *
FROM Member
INNER JOIN aspnet_Users ON Member.user_id = aspnet_Users.UserId
WHERE [aspnet_Users].[UserName] = '{0}'", "Marina2");
What am I doing wrong?