In order to learn like, take a look a the LINQ-resources and tutorials out on the Internet. For example the LINQ-Overview at MSDN or at this example-collection. Here are a few db4o LINQ examples.
This query just returns all persons.
var allPersons = from Person p in container select p;
Dim allPersons = From p In container _ Select p
This query searches for a person by name.
var allPersons = from Person p in container where p.Name.Equals("Joe") select p;
Dim allPersons = From p As Person In container _ Where p.Name.Equals("Joe") _ Select p
This queries for a certain age.
var allPersons = from Person p in container where p.Age > 21 select p;
Dim allPersons = From p As Person In container _ Where p.Age > 21 _ Select p
Sort the results of a query.
var allPersons = from Person p in container where p.Age > 21 orderby p.Name select p;
Dim allPersons = From p As Person In container _ Where p.Age > 21 _ Order By p.Name _ Select p
You can get the .NET IQueryable interface for db4o
IQueryable<Person> personQuerable = container.AsQueryable<Person>(); var adults = from p in personQuerable where p.Age > 18 orderby p.Name select p;
Dim personQuerable As IQueryable(Of Person) = container.AsQueryable(Of Person)() Dim adults = From p In personQuerable _ Where p.Age > 18 _ Order By p.Name _ Select p