tags:

views:

242

answers:

1

where can I find the code for GetCustomerList(), GetOrderList() for the LINQ 101 samples

+2  A: 

You really don't need them, and I don't think they are provided. They are just placeholders for however you get your list to begin with. All that matters is they are returning a list of a specific type that the LINQ query expects.

Edit: If you're just looking to play around with the samples, you could make a method that's just a stub to provide dummy data, something like:

private List<Customer> GetCustomerList() {
    List<Customer> customers = new List<Customers>();
    Customer bob = new Customer();
    bob.name = "bob";
    bob.id = 1;
    customers.add(bob);

    Customer fred = new Customer();
    fred.name = "fred";
    fred.id = 2;
    customers.add(fred);

    return customers;
}

Of course I don't know what your customer class has for properties, so adjust that appropriately.

Parrots