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);
            }
        }
Exemple #2
0
 public void AddOwnedCar(Car car)
 {
     ownedCars.Add(car);
 }
Exemple #3
0
 public Driver(string name, Car mostLovedCar)
 {
     this.name = name;
     this.mostLovedCar = mostLovedCar;
 }