title: This Dapper Query is always returning a null
body: <pre><code>using System;
  using System.Collections.Generic;
  using System.Data.SqlClient;
  using System.Linq;
  using System.Web;
  using Dapper;
  namespace Calculate.Models
  {
      public class SelectedDetailsGetter
      {
          SqlConnection con = new SqlConnection("Data Source=CHANDAKG-01-L\\SQLEXPRESS;initial catalog=Calculator;integrated security=true");
          public IEnumerable&lt;SelectedDetails&gt; GetSelectedDetails(string Name)
          {
  
              string query = "SELECT * FROM DataNorm WHERE Provider=@name AND year(DateMonth)=2014";
                  var result = con.Query&lt;SelectedDetails&gt;(query,new { name = Name });
                  return result;
          }
      }
  }
  </code></pre>
  
  <p>This Query is always returning a null. Is there something wrong?? And can anyone tell the use of <code>SingleOrDefault()</code></p>