public static IEnumerable <Expression <Func <Customer, CustomerOrdersReturn> > > SplitSelectCustomerOrders(AdventureWorksContext context)
        {
            var splitSelectOrder = SalesOrderProjectors.SplitSelectOrder(context);
            var address          = AddressProjectors.SelectAddress();
            var contact          = ContactProjectors.SelectContact();

            return(new Projectors <Customer, CustomerOrdersReturn>
            {
                c => new CustomerOrdersReturn
                {
                    AccountNumber = c.AccountNumber,
                    Type = c.CustomerType,
                    Contact = contact.Invoke(c.Individual.Contact),
                    Addresses = c.CustomerAddresses.Select(a => address.Invoke(a.Address)),
                },
                { splitSelectOrder, p => c => new CustomerOrdersReturn
                  {
                      Orders = c.SalesOrderHeaders.Select(o => p.Invoke(o))
                  } }
            });
        }
        public static IEnumerable <Expression <Func <Employee, EmployeeSalesReturn> > > SelectSales(AdventureWorksContext context)
        {
            var contact     = ContactProjectors.SelectContact();
            var sales       = SalesOrderProjectors.SplitSelectOrder(context);
            var territories = SalesTerritoryProjector.SplitSelectSalesTerritory(context);

            return(new Projectors <Employee, EmployeeSalesReturn>
            {
                e => new EmployeeSalesReturn
                {
                    Contact = contact.Invoke(e.Contact)
                },
                { sales, p => e => new EmployeeSalesReturn
                  {
                      Orders = e.SalesPerson.SalesOrderHeaders.Select(o => p.Invoke(o))
                  } },
                { territories, p => e => new EmployeeSalesReturn
                  {
                      TerritorySales = new [] { e.SalesPerson.SalesTerritory }.Select(t => p.Invoke(t)).FirstOrDefault()
                  } }
            });
        }