DataClassesDataContext dc = new DataClassesDataContext();
private string GetPropertyCompany()
{
var res=from b in dc.Tbl1 select b;
string a;
foreach(var item in res)
a+=item.name;
// dc.Connection.Close();
return a;
}
This code requires a close connection;
me should always close the connection;
without dc.Connection.Close();
work fine!!!!