Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to do sub-queries? #46

Open
jfrank14 opened this issue Aug 31, 2022 · 0 comments
Open

How to do sub-queries? #46

jfrank14 opened this issue Aug 31, 2022 · 0 comments

Comments

@jfrank14
Copy link

I need to do a ContainingAll query on an object's scalar properties and that of a child collection object.

q = q.Search(Function(t) t.Name,
    Function(t) t.ClassName,
    Function(t) t.OrderNumber).
    ContainingAll(fields).
    Where(Function(t) t.Contacts.Search(Function(x) x.Name).ContainingAll(fields).Any)

That t.Contacts property is itself a collection that I need to search, but doing it this way throws the exception System.NotSupportedException: 'LINQ to Entities does not recognize the method 'NinjaNye.SearchExtensions.EnumerableStringSearch'1[Suntex.FirstInMath.Models.Api.Admin.Teams+Contact] ContainingAll(System.String[])' method, and this method cannot be translated into a store expression.'

Is there a way to do this kind of sub-query?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant