private static void StoreExampleObjects()
        {
            using (IObjectContainer container = Db4oEmbedded.OpenFile(DatabaseFileName))
            {
                var beetle = new Car("VW Beetle");
                var ferrari = new Car("Ferrari");

                var driver = new Driver("John", ferrari);
                driver.AddOwnedCar(beetle);
                driver.AddOwnedCar(ferrari);

                container.Store(driver);
            }
        }
Beispiel #2
0
 public void AddOwnedCar(Car car)
 {
     ownedCars.Add(car);
 }
Beispiel #3
0
 public Driver(string name, Car mostLovedCar)
 {
     this.name = name;
     this.mostLovedCar = mostLovedCar;
 }