I have an exception when I use sql.data.client to query database sqlserver :
system.platformnotsupportedexception microsoft.data.sqlclient is not supported on this platform
My code source :
using (var connection = new SqlConnection(connectionString))
{
using (var cmd = new SqlCommand(queryString, connection))
{
cmd.Connection = connection;
connection.Open();
using (SqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
return true;
}
}
}
}