예제 #1
0
        private void SimpleQuery3()
        {
            var nwdc = new NorthwindDataContext();

            //Cities in Spain with Customers
            var spainCities = (from cust in nwdc.Customers
                               where cust.Country == "Spain"
                               select cust.City).Distinct();

            var dataCommand = nwdc.GetCommand(spainCities);

            Console.WriteLine("\n" + dataCommand.CommandText + "\n");

            "Cities in Spain with Customers".DisplayResults(spainCities);
        }