Esempio n. 1
0
        private static void StoreData(IObjectContainer container)
        {
            Pilot john = new Pilot("John", 42);
            Pilot joanna = new Pilot("Joanna", 45);
            Pilot jenny = new Pilot("Jenny", 21);
            Pilot rick = new Pilot("Rick", 33);

            container.Store(new Car(john, "Ferrari"));
            container.Store(new Car(joanna, "Mercedes"));
            container.Store(new Car(jenny, "Volvo"));
            container.Store(new Car(rick, "Fiat"));
        }
Esempio n. 2
0
 // #example: Query as method
 private static bool AllJohns(Pilot pilot)
 {
     return pilot.Name == "John";
 }
Esempio n. 3
0
 // #example: Query as method
 private static bool AllJohns(Pilot pilot)
 {
     return(pilot.Name == "John");
 }