Пример #1
0
 private static void StoreObjectsIn(string databaseFile)
 {
     using (IObjectContainer db = OpenDatabase(databaseFile))
     {
         Pilot john = new Pilot("John", 100);
         Car johnsCar = new Car(john, "John's Car");
         db.Store(johnsCar);
         Pilot max = new Pilot("Max", 200);
         Car maxsCar = new Car(max, "Max's Car");
         db.Store(maxsCar);
         db.Commit();
     }
 }
Пример #2
0
 public Car(Pilot pilot, string name)
 {
     this.pilot = pilot;
     this.name = name;
 }
Пример #3
0
 public Car(Pilot pilot, string name)
 {
     this.pilot = pilot;
     this.name  = name;
 }