title: How to make graph or chart in asp.net mvc 4?
body: <p>I am creating a graph using database but i cannot access the values from database, an error is occurred during execution. And this is my code in cshtml.</p>
  
  <pre><code>@{
      var db = Database.Open("Database1");
      var data = db.Query("SELECT Name, price FROM Product");
      var myChart = new Chart(width: 600, height: 400)
          .AddTitle("Product Sales")
          .DataBindTable(dataSource: data, xField: "Name")
          .Write();
  }
  </code></pre>
  
  <p>This is the error when i run the application:
  A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)</p>
  
  <p>Note: Second line, about query, is highlighted during error.</p>