Exemplo n.º 1
0
        /// <summary>
        /// Returns sequence containing customers from Washington (WA) region and IDs of their orders placed on or after 1.1.1997.
        /// </summary>
        /// <returns>Collection with customers from Washington (WA) region and IDs of their orders placed on or after 1.1.1997.</returns>
        public static IEnumerable <CustomerOrderDto> SelectMany()
        {
            List <Customer> customers = DataLoader.GetCustomerList();

            // !!! INSERT YOUR LINQ  MAGIC HERE !!!

            return(new CustomerOrderDto[] { });
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns list of customers and how many orders each has.
        /// </summary>
        /// <returns>Dictionary where key is customer ID and value is count of their orders.</returns>
        public static Dictionary <string, int> Count03()
        {
            List <Customer> customers = DataLoader.GetCustomerList();

            // !!! INSERT YOUR LINQ  MAGIC HERE !!!

            return(new Dictionary <string, int>());
        }
Exemplo n.º 3
0
        /// <summary>
        /// Reurns one sequence that contains the common first letter from both product and customer names.
        /// </summary>
        /// <returns>Collection with common first letter from both product and customer names.</returns>
        public static IEnumerable <char> Intersect02()
        {
            List <Product>  products  = DataLoader.GetProductList();
            List <Customer> customers = DataLoader.GetCustomerList();

            // !!! INSERT YOUR LINQ  MAGIC HERE !!!

            return(new char[] { });
        }