I tried doing something like this. Which works with Mongodbs driver but doesn't seem to work here.
It keeps throwing an exception but the exception is null.
List<ComposerMdb.MongoConnection> connRets = null;
using (var db = new LiteDatabase(conn.DatabaseFilePath))
{
connRets = db.GetCollection<ComposerMdb.MongoConnection>().Find(c => c.Name.ToUpper() == name.ToUpper()).ToList();
}
It's a bit late but for anyone looking for a solution you can query over the tow possibilities with Query.Or
string lower = value?.ToLower();
string upper = value?.ToUpper();
return col.Find(Query.Or(Query.Contains(field, lower), Query.Contains(field,upper))).ToList();
Even more late, you can create expression index to search using only lower (or upper) case.
db.EnsureIndex("idx_name", "LOWER($.Name)");
db.Find(Query.EQ("idx_name", nameVar.ToLower()));
Most helpful comment
Even more late, you can create expression index to search using only lower (or upper) case.