I've the next error in my sql server's connection to visual studio:
ArgumentException: The specified invariant name 'System.Data.SqlClient' wasn't found in the list of registered .NET Data Providers.
The code in my app.config file is:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="SQL_Connection"
connectionString="Data Source=DESKTOP-ROTBMUO;
Initial Catalog=johnsonControls;
Persist Security Info=True
User ID=DESKTOP-ROTBMUO\Macbook Pro;"
providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
And the error that shows me in my index.cshtml page is the next one:
@using WebMatrix.Data;
@{
var db = Database.Open("SQL_Connection");
var queryShow = "EXEC verLineasYAreas";
foreach (var row in db.Query(queryShow)) {
@row.nombre;
}
}
I don't know if I've to install some packeage called System.Data.SqlClient just like I did with Web.Matrix or if the problem is in my or in my foreach. I hope you guys can help me, or if you've one better way to do a connection I'd like to see it!