title: Dapper Execute returns -1 value?
body: <p>The following SQL query returns 1 when the given values are available, and 0 when not available, and it works fine in SQL Server Management Studio,</p>
  
  <pre><code>select 
      case 
         when exists (select * from [dbo].[user] 
                      where userName = 'admin' 
                        and password = 'admin') 
            then cast(1 as bit) 
            else cast(0 as bit)
      end
  </code></pre>
  
  <p>The same query with dapper ORM is the following:</p>
  
  <pre><code>public int login(string userName, string password)
  {
          string sql = "select case when exists(select * from user where userName = @usernamepara and password = @passwordpara) then cast(1 as bit) else cast(0 as bit )end";
  
          using(IDbConnection conn = dbConnection)
          {
              conn.Open();
  
              var res = conn.Execute(sql, 
                                     param: new { usernamepara = userName, 
                                                  passwordpara = password });
              conn.Close();
              return res;
          }
      }
  </code></pre>
  
  <p>But when this method is called, it returns -1 for matching and non matching records. What's wrong here ?</p>