returns recordset with fields like [First Name], [Last Name], and [City].
Question 1: wscgsContext.Search
<-- shows an error:
WSCGSoftwareDataContext does not contain a definition for 'Search' and no extension method accepting a first argument of type WSCGSoftwareDataContext could be found (are you missing a using directive or an assembly reference?)
Question 2: How can I complete the LINQ on line 5 to group and sort it for [City] only?
Optionally we can use Distinct if it has a better performance.
string cs = ConfigurationManager.ConnectionStrings["WSCGSoftwareConnectionString"].ConnectionString;
SqlConnection cnn =new SqlConnection(cs);
WSCGSoftwareDataContext wscgsContext = new WSCGSoftwareDataContext(cnn);
FYI: I have "public partial class Search" in WSCGSoftware.Designer.cs.
If assembly is missing, I cannot figure out what is missing. Could this possibly be a name space issue?
dynamic outputs = from output in wscgsContext.Search select output.City;
foreach (WSCGSoftwareDataContext search in outputs)