title: connect to mysql , CSHTML
body: <p>I have the following code:</p>
  
  <pre><code>  @{
  
      Layout = "~/_SiteLayout.cshtml";
      Page.Title = "About";
      if(Request["id"].IsEmpty()){
      Write("something");
  } else {
      DataSet ds = new DataSet();
     var Id = Request.QueryString["id"].ToString();  
      var db = Database.Open("SmallBakery");
      var selectQueryString = String.Format("SELECT * FROM Products where Id={0}", Id);  
  }
  
  
  }
  
  &lt;!DOCTYPE html&gt;
  
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8" /&gt;
          &lt;title&gt;&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
            &lt;table&gt;  
  
              &lt;tr&gt;  
  
                  &lt;th&gt;Product&lt;/th&gt;  
  
              &lt;/tr&gt;  
        @if (ds.Tables[0].Rows.Count &gt;0){
  
              &lt;tr&gt;  
                  &lt;td&gt;@row.Id&lt;/td&gt;  
                  &lt;td&gt;@row.Name&lt;/td&gt;
  
  
              &lt;/tr&gt;  
  
            }
      &lt;/table&gt;  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The problem here that I get an error in this line :"@if (ds.Tables[0].Rows.Count > 0)"</p>
  
  <p>My question is why and how can I fix it (I just start learn this and it is new for me...)
  Thanks.</p>