Skip to main content

Questions tagged [predicatebuilder]

Allows you to dynamically composing expression predicates to be used in WHERE clauses in LINQ and also in EntityFramework.

predicatebuilder
0 votes
0 answers
30 views

Search implemented using LinqKit predicateBuilder working fine in the local but not working in the dev build

I have implemented a search functionality using the LinqKit predicate builder. It is working fine in the local environment and when it is published to a folder the same functionality is not working. ...
sid's user avatar
  • 1
1 vote
1 answer
52 views

PredicateBuilder Not Working in Loop, But Working Manually

I am trying to use LinqKit's PredicateBuilder to create some nested logic to compare against SQL, and this works fine when I manually specify the conditions, but when I place the code in a loop I get ...
Bob Smith's user avatar
  • 242
0 votes
0 answers
37 views

Join LinqKit.PredicateBuilder across different Tables C#

I am trying to use LinqKit.PredicateBuilder to return if I should display a certain food drink item. My setup is, I have a FoodDrinkType table, FoodDrinkLink table, Enquiry table, EnquiryVenue table. ...
Smac 's user avatar
  • 401
0 votes
0 answers
184 views

.NET 6 PredicateBuilder and Object.GetProperty() not working as expected with Dynamic Property names

I am currently working in WinUI 3 .NET 6 application and needed to implemented a PredicateBuilder as I need to provide dynamic Lambda Conditions based on dynamic property names. private ...
Sulay Joshi's user avatar
0 votes
1 answer
52 views

How to compare value with predicate criteria builder

I have an searchValue, inputted by user, and I want to find all the customers that have similar name, email, username, phone,... etc. like it. I'm using the Specifications to create a spec then inject ...
Jin Kisara's user avatar
0 votes
1 answer
197 views

Guidance on adding filter expression to query

The application I am working on produces reports. I am tryingto implement some of the filtering which can involve up to several dozen fields in various combinations. I had previously used Dapper with ...
Albert Brennan's user avatar
0 votes
1 answer
24 views

How to use predicate builder for a string range

This expression works fine for a date range, how would I do the same for a string range: expression = expression.And(x => x.ProductReceivedDate <= options.ProductReceivedDateEnd) ...
Kelvin's user avatar
  • 1
1 vote
2 answers
214 views

PredicateBuilder with navigation properties and multiple conditions

I'm using the PredicateBuilder in the LinqKit to dynamically form the Where expression. When either LastName or FirstName from the SearchCriteria is populated then the SQL statement works correctly. ...
Andy's user avatar
  • 13
1 vote
0 answers
176 views

PredicateBuilder null check not added to query

I have a situation where I want to query an accounts table. I want all accounts except accounts where ParentId != null as default. I have tried the following with the predicate builder, but it does ...
IceCode's user avatar
  • 1,731
0 votes
0 answers
159 views

ef core linq to entities with multi-level where clauses

I'm working on an api endpoint that takes optional search parameters. This is sort of complicated because of the table structure. I'm trying to figure out the best and most efficient approach to ...
joby-flick's user avatar
  • 1,828
0 votes
0 answers
34 views

The LINQ expression node type 'Invoke' is not supported in LINQ to Entities

I have written a query that works fine when I use ToList() at the end of query before calling the predicate, but it throws an exception when I don't use ToList(). I don't want to use ToList() until ...
Engr Umair's user avatar
1 vote
1 answer
1k views

Querydsl Contains Column value in a String

Generally we can use QObject.column.in(String[]) to find rows that specific column value in a string list. But how can we filter if column value exists in a large string? Something like QObject....
user3025404's user avatar
0 votes
0 answers
359 views

How to pass a predicate as parameter into IActionResult in ASP.NET MVC

I want to refactor my huge messy code and am stuck. I have an IActionResult Index which makes a simple Select on a Table. Later I added two different searchpanels, which are pretty complicated and ...
mark_da_rat's user avatar
0 votes
1 answer
507 views

LINQ dynamic expression in order by clause

I have the following query: product = product.OrderByDescending(d => d.ProductAttributeItem .Where(ai => ai.AttributeItem.AttributeId == (int)DefaultAttributes.Name) ...
Ivaylo's user avatar
  • 476
2 votes
0 answers
324 views

Entity Framework LinqKit dynamic where predicate over related data

The code is in Alpha version, don't have validations or error management ... It would be included later. I have a very simple model with two related entities: Location and Country: public class ...
Hermann's user avatar
  • 21

15 30 50 per page
1
2 3 4 5
17