Searching with Boolean Flags
Linq queries against boolean properties can use shorthand mechanisms in Where() clauses like so:
cs
public async Task query_by_booleans(IDocumentSession session)
{
// Flag is a boolean property.
// Where Flag is true
await session.Query<Target>().Where(x => x.Flag).ToListAsync();
// or
await session.Query<Target>().Where(x => x.Flag == true).ToListAsync();
// Where Flag is false
await session.Query<Target>().Where(x => !x.Flag).ToListAsync();
// or
await session.Query<Target>().Where(x => x.Flag == false).ToListAsync();
}
