question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not implemented Linq expression

See original GitHub issue

Hallo,

I isolated access to LiteDB in my code. And when I try to use lambda, as a parameter, this does not work.

static void test<T>(Driver driver, Func<T, bool> func)
        {
            var somethings = driver.Connection.Instance.GetCollection<GenericEntry<T>>(typeof(T).Name);
            Expression<Func<GenericEntry<T>, bool>> exp = ge => func(ge.Entry);
            var resultA = somethings.Find(exp).ToList();
        }

thx

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mbdavidcommented, Nov 15, 2016

I removed this new() contraints. It’s was valid a long time ago - I change all reflection lib. Need more tests but I beleave there is no problem with not using new() (see dev branch).

0reactions
VladimirHamburgcommented, Nov 15, 2016

Hi @mbdavid , it works! Thank you so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Linq expression not supported
The problem is that when I use allItemsOver64 it says that this expression is not supported. I have a feeling that this error...
Read more >
Expression.Not Method (System.Linq.Expressions)
If method is not null and it represents a non-void, static ( Shared in Visual Basic) method that takes one argument, it is...
Read more >
NotImplementedException thrown if predicate passed into ...
Hi. I am running into a NotImplementedException exception any time I attempt to pass a predicate into any linq method, if it's called...
Read more >
C# – The method or operation is not implemented while ...
i m trying to use linq to nhibernate 3 and i have made following linq query var a = (from c in Session.Query<ChoiceValue>()...
Read more >
70722: ' The method or operation is not implemented. ...
Bug #70722, ' The method or operation is not implemented. ' when using LINQ with OrderBy. Submitted: 24 Oct 2013 23:43, Modified: 21...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found