title: Record count in c# query result
body: <p>How can i get Total records count in query result</p>
  
  <pre><code>   SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["con1"].ConnectionString);
                string sql = "select  Fare , OrderAmount FROM orderitems OI INNER JOIN Orders O ON O.OrderID = OI.OrderID WHERE PaymentStatusID = 1  AND o.orderid ="+Orderid;                 
              SqlCommand comd = new SqlCommand(sql, con1);
                 con1.Open();
                comd.ExecuteNonQuery();
  </code></pre>
  
  <p>Above is my sql query i need result count, can some one help me 
  Thanks in advance.</p>