dj-nitehawk / MongoDB.Entities

A data access library for MongoDB with an elegant api, LINQ support and built-in entity relationship management

Home Page:https://mongodb-entities.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About the MongoDB.Driver.Linq.ExpressionNotSupportedException

thepra opened this issue · comments

commented

I'm getting quite many of those exceptions when using more or less complex Match(e => <condition>), ex:

DB.Find<User>().Match(u => workersRolesFilter.Contains(u.Role.Name) && u.DeletionDate == null).ExecuteAsync(token);

Am I supposed to use instead DB.Queryable<User>() .Where(...) for such queries? If yes, what are the limits of Match(e => ...)?

commented

It's weird, it's as if despite throwing MongoDB.Driver.Linq.ExpressionNotSupportedException it does return in the end a valid and filtered result...
And Queryable<T>() doesn't help either.
Should I ignore this exceptions?

gonna need a self contained repro to look in to this. it doesn't seem to throw with stuff i tried.