How to put trim()

List bsonPlanData = database.GetCollection(Startup.mongoDB_ScurvePlanCollection).AsQueryable().Where(w => w.BridgeId.ToUpper() == BridgeId.ToUpper()).ToList();

i am not able to put trim after ToUpper();

Hi @Rajesh_Yadav,

If you’re referring to calling Trim() for w.BridgeId in comparison, currently that’s not supported. There’s an open ticket: CSHARP-2077, feel free to watch/up-vote to receive notifications on it.
Ideally the value should be trimmed before insertion to the database. As an alternative, you can use Contains(), for example:

var planData = collection.AsQueryable()
                    w => w.BridgeId.ToUpper().Contains(BridgeId.ToUpper())