title: How to see the SQL query for my lambda expression
body: <pre><code>    public static IList&lt;EmployeeObject&gt; GetAllEmployee()
      {
          IList&lt;EmployeeObject&gt; emps = new List&lt;EmployeeObject&gt;();
  
          using (SqlConnection conn = new SqlConnection(connString))
          {
              connection.Open();
              //....
              using (SqlDataReader reader = sqlCommand.ExecuteReader())
              {
                  while (reader.Read())
                  {
                    //...add
                  }
              }
           }
         return emps.ToList();
       }
  
  
  public static IQueryable&lt;EmployeeObject&gt; QueryableSQL()
  {
      IQueryable&lt;EmployeeObject&gt; queryable = EmployeeRepository.GetAllEmployee(); 
  }
  </code></pre>
  
  <p>requirement to cross check the Lambda expression query is correct or not. It means how the lambda expression execute against, I'm not using Entity framework, I have searched on the web and I did not find any blog that related to what I'm looking for.
  Any help SQL Profiler? or ObjectQuery? anything that shows me what sql is generating.</p>
  
  <pre><code>var query = QueryableSQL().Where(employee =&gt; 
      employee.Interests.Any(interest =&gt; interest.Name ==  "Chess"));
  </code></pre>