Saving Objects

Client.cs: SavePilots
01private static void SavePilots() 02 { 03 Console.WriteLine("Saving Pilot objects without Pilot class on the server"); 04 IObjectContainer oc = Db4oFactory.OpenClient("localhost", 0xdb40, "db4o", "db4o"); 05 try 06 { 07 for (int i = 0; i < COUNT; i++) 08 { 09 oc.Set(new Pilot("Pilot #" + i, i)); 10 } 11 12 } 13 finally 14 { 15 oc.Close(); 16 } 17 }
 

Client.vb: SavePilots
01Private Shared Sub SavePilots() 02 Console.WriteLine("Saving Pilot objects without Pilot class on the server") 03 Dim oc As IObjectContainer = Db4oFactory.OpenClient("localhost", &HDB40, "db4o", "db4o") 04 Try 05 Dim i As Integer = 0 06 While i < COUNT 07 oc.Set(New Pilot("Pilot #" + i, i)) 08 System.Math.Min(System.Threading.Interlocked.Increment(i), i - 1) 09 End While 10 Finally 11 oc.Close() 12 End Try 13 End Sub
 

You can check the saved objects using ObjectManager or the querying examples.