I have a connection string and I want to use LINQ to query a remote database. In the Microsoft example they use the DataContext class. However the DataContext does not appear in Intellisense. It says that it uses 'System.Data.Linq` but I am not seeing that either. http://msdn.microsoft.com/en-us/library/bb350721(v=vs.110).aspx
Is there a Hello World example for using a connection string and LINQ?
public void SimpleQuery()
{
var connectionString = @"Server=10.1.10.1;database=Mydatabase;uid=myusername;password=mypassword;";
DataContext dc = new DataContext(connectionString);
var q =
from n in dc.table
select n;
Console.WriteLine(n);
}