It seems like OrmLite Select(predicate) function it brings back everything in the where clause (across the network) and then applies the .Take(x) on top of that.
I need a way to only bring back the TOP x so the results are faster and use less bandwidth.
Is there a way to limit TOP rows returned by OrmLite select (using a Linq Expression)?
Limit and Offset support is available using the Limit()
expression, e.g::
var rows = db.Select<Table>(q => q.Where(x => x.Name != null).Limit(10));
var rows = db.Select<Table>(q => q.Where(x => x.Name != null).Limit(5,10));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With