We are using LiteRepository . It is working fine until update to 5.0.0-alpha.
Updated the calls according to the new implementation.
But failing while converting predicate to BsonExpression.
Stack:
System.NotSupportedException: 'Method Contains(Func<T,TResult>) in Enumerable are not supported when convert to BsonExpression (value(Agner.Helpers.CallDataHelper+<>c__DisplayClass1_0).allstocks.SelectMany(x => x.ContactIds).Distinct().Contains(e.MobileId)).'
at LiteDB.LinqExpressionVisitor.VisitMethodCall(MethodCallExpression node)
at System.Linq.Expressions.ExpressionVisitor.VisitLambda[T](Expression1 node) at LiteDB.LinqExpressionVisitor.VisitLambda[T](Expression1 node)
at LiteDB.LinqExpressionVisitor.Resolve(Expression expr, Boolean predicate, Boolean extend)
at LiteDB.LiteQueryable1.Where(Expression1 predicate)
at LiteDB.LiteRepository.Fetch[T](Expression1 predicate, String collectionName) at Agner.Repository.Get[T](Expression1 query) in C:\Agner\Repository.cs:line 36
at Agner.Helpers.CallDataHelper.GetAttachedItems(IEnumerable1 calls, IEnumerable1 IRepository repository) in C:\Agner\Helpers\CallDataHelper.cs:line 27
at Agner.Helpers.CallDataHelper.GetStocks(IRepository repository, ICace cace) in C:\Agner\Helpers\CallDataHelper.cs:line 17
at Agner.DashboardViewModel.b__180_0() in C:\Agner\DashboardViewModel.cs:line 379
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
We are using LiteRepository . It is working fine until update to 5.0.0-alpha. Updated the calls according to the new implementation. But failing while converting predicate to BsonExpression.
Stack:
System.NotSupportedException: 'Method Contains(Func<T,TResult>) in Enumerable are not supported when convert to BsonExpression (value(Agner.Helpers.CallDataHelper+<>c__DisplayClass1_0).allstocks.SelectMany(x => x.ContactIds).Distinct().Contains(e.MobileId)).'
at LiteDB.LinqExpressionVisitor.VisitMethodCall(MethodCallExpression node) at System.Linq.Expressions.ExpressionVisitor.VisitLambda[T](Expressionb__180_0() in C:\Agner\DashboardViewModel.cs:line 379
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
1 node) at LiteDB.LinqExpressionVisitor.VisitLambda[T](Expression
1 node) at LiteDB.LinqExpressionVisitor.Resolve(Expression expr, Boolean predicate, Boolean extend) at LiteDB.LiteQueryable1.Where(Expression
1 predicate) at LiteDB.LiteRepository.Fetch[T](Expression1 predicate, String collectionName) at Agner.Repository.Get[T](Expression
1 query) in C:\Agner\Repository.cs:line 36 at Agner.Helpers.CallDataHelper.GetAttachedItems(IEnumerable1 calls, IEnumerable
1 IRepository repository) in C:\Agner\Helpers\CallDataHelper.cs:line 27 at Agner.Helpers.CallDataHelper.GetStocks(IRepository repository, ICace cace) in C:\Agner\Helpers\CallDataHelper.cs:line 17 at Agner.DashboardViewModel.