My project is C# and uses CastleProject ActiveRecord on MS SQL Server database.
I need to retrieve N consequent items from the database, sorted by some criteria, started from some value.
Example: I have a lot of messages in some table, where message has ID, time and text. I'd like to retrieve messages with position from 100 to 120, when they are sorted by time.
I cannot read all messages, and then sort and find on a client because there may be many messages in database (say it, a million of).
Is it possible to achieve with ActiveRecord means or only with stored procedures on SQL Server?