Execute a “SELECT TOP n” in DB4O
Question
Does anyone know how how to execute something like a "SELECT TOP n" in DB4O in C#
Solution
This page should be useful to you:
http://developer.db4o.com/forums/thread/55863.aspx
Also if you like it, here's a LINQ implementation for DB4O:
http://www.codeproject.com/KB/database/LINQ_for_db4o.aspx
OTHER TIPS
Results of a db4o query are lazy through the use of the facade pattern. You can do a simple for loop from i = 0 to i = n in order to work only with the top n items. The rest are not activated, although they are countable through the facade's Count property.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow