I just try to connect to my database with SqlConnection, but I saw the error...
The point is I'm using System.Data.SqlClient, but it looks like it doesn't work somehow...
private string ConectionString = "Data Source=.;Initial Catalog=Contact_DB;Integrated Security=true";
public DataTable SelectAll()
{
string query = "Select * From MyContacts";
SqlConnection Connection = new SqlConnection(ConnectionString);
}
Also it shows this error:
Severity Code Description Project File Line Suppression State
Error CS1069 The type name 'SqlConnection' could not be found in the namespace 'System.Data.SqlClient'. This type has been forwarded to assembly 'System.Data.SqlClient, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Consider adding a reference to that assembly. MyCountacts D:\Visual Studio Projects\C#\MyCountacts\MyCountacts\Repository\Services\MyContactsRepository.cs 28 Active
What can I do now?