Documentation of Tables in the Querying with Indexes for Range Queries for C# is incorrect.
It reads:
// Find users aged 18 or older
foreach (var user in ctx.Db.User.Age.Filter(new Bound<byte>.Inclusive(18), null))
{
Log.Info($"{user.Name} is an adult");
}
Bound does not expose .Inclusive/.Exclusive constructors (these are in the internal namespace). Instead you pass the min/max values directly (or use tuple literals). The corrected example should look like:
// Find users aged 18 or older (inclusive)
foreach (var user in ctx.Db.User.Age.Filter(new Bound<byte>(18, byte.MaxValue)))
{
Log.Info($"{user.Name} is an adult");
}
You can also use the implicit tuple conversion, like ctx.Db.User.Age.Filter((18, byte.MaxValue)), which is functionally identical.