This is presumably because NorthwindDataContext()
does not implement the IDisposable
interface so you can't use it within a using()
statement.
Try this instead:
public List<string> GetCountries()
{
var context = new NorthwindDataContext();
return (from c in context.Customers
select c.Country).Distinct().ToList();
}