예제 #1
0
        private static void StoreExampleObjects()
        {
            using (IObjectContainer container = Db4oEmbedded.OpenFile(DatabaseFile))
            {
                // #example: Store a driver and his cars
                var beetle = new Car("VW Beetle");
                var ferrari = new Car("Ferrari");

                var driver = new Driver("John", ferrari)
                                 {
                                     OwnedCars = new List<Car> {beetle, ferrari}
                                 };

                container.Store(driver);
                // #end example
            }
        }
예제 #2
0
파일: Driver.cs 프로젝트: Galigator/db4o
 public void AddOwnedCar(Car item)
 {
     ownedCars.Add(item);
 }
예제 #3
0
파일: Driver.cs 프로젝트: Galigator/db4o
 public Driver(string name,Car mostLovedCar)
 {
     this.name = name;
     this.mostLovedCar = mostLovedCar;
 }