ninjanye / SearchExtensions

Library of IQueryable extension methods to perform searching
MIT License
331 stars 52 forks source link

Is there a way to get access to the expression/search stuff without an instance of an IQueryable/IEnumerable? #35

Open VictorioBerra opened 5 years ago

VictorioBerra commented 5 years ago

Ideally, I need something like this:

var searchCustomersByEmployeeNameOrEmailExpression = 
    NinjanyeSearch<Customer>(c => c.Employee.Name, c.Employee.EmailAddress)
    .Containing(viewModel.SearchQuery)
    .AsExpression();

I am trying to build up what is basically a object that holds my search configuration which gets mapped to a request to my API essentially.

I can then save that expression and pass it right to EntityFramework when I am ready.