predicatebuilder Questions
2
Solved
i have a function:
private IEnumerable<Promotion> MatchesKeyword(IEnumerable<Promotion> list, String keyword)
{
...snip...
}
which right now performs a LINQ query:
private IEnumera...
Dinette asked 30/1, 2012 at 16:40
1
Solved
public string[] FindAssets2()
{
string[] result;
using (var ctx = new StockContext())
{
var predicate = PredicateBuilder.New<Asset>().Or(asset => asset.Symbol.Contains("TSLA"...
Durand asked 25/6, 2020 at 15:6
2
Solved
I'm beginning to use LinqKit's PredicateBuilder to create predicate's with OR conditions which is not possible with Linq expressions.
The problem I'm facing is if I begin with PredicateBuilder.Tru...
Isotropic asked 10/3, 2013 at 17:30
2
I have the code:
var predicate = PredicateBuilder.True<Value>();
predicate = predicate.And(x => x.value1 == "1");
predicate = predicate.And(x => x.value2 == "2");
var vals = Value.A...
Kiloliter asked 22/5, 2013 at 15:15
1
Solved
I have the following class:
public class testClass
{
public string name { get; set; }
public int id { get; set; }
public int age { get; set; }
}
and the following code:
var list = new List&...
Adjoining asked 30/8, 2017 at 13:43
2
Solved
Let's say I've created some anonymous type via a LINQ query:
var query = from Person in db.People
join Pet in Pets on Person.ID equals Pet.PersonID
join Thingy in Thingies on Person.ID equals Th...
Affrica asked 19/5, 2017 at 16:19
3
Solved
var predicate = PredicateBuilder.True<o_order>();
This is my predicate expression, where on some certain conditions I will append expressions with it.
Likewise
if (!string.IsNullOrEmpty...
Diplomatics asked 25/6, 2015 at 9:52
1
Solved
Most of my entities (not all) have two properties called CompanyId and Deleted. How would be possible to auto insert these two properties for all select requests instead of setting manually on ever...
Wojak asked 15/12, 2016 at 1:19
1
I am getting the following error when using the predicate builder with Entity Framework Core.
The source IQueryable doesn't implement IAsyncEnumerable. Only
sources that implement IAsyncEnumera...
Basidiomycete asked 9/3, 2016 at 22:20
1
Solved
I have sitecore pages / lucene documents with the following fields:
Title
Filename
Content
File Contents
I'm creating a search for these and have the following requirements:
Hits containing t...
Frizette asked 8/7, 2016 at 8:10
4
Solved
I found this code below in a file called Filter.cs in a project created with Microsoft App Studio. Although I am a veteran C# programmer, I'm short on experience with LINQ predicate expression buil...
Joy asked 24/1, 2014 at 20:33
1
Solved
A certain set of criteria that occurs in many different queries throughout our application has slowly grown more complex. To avoid duplication of this code, I want to split these criteria out into ...
Mellette asked 26/6, 2013 at 17:7
1
Solved
I have a list of Ids and I only want to do an AND on the first one and and OR on the subsequent ones. In the past, I have kept a counter variable and when the counter is 1, I do the And, but after ...
Gambill asked 30/5, 2013 at 14:43
1
Solved
I have a list of partial strings that I need to match in a table. I'm using PredicateBuilder.
var predicate = PredicateBuilder.False<Name>();
List<string> names = new List<string>...
Cacka asked 15/1, 2013 at 23:5
1
I need to know about using PredicateBuilder. On almost every example of how to use it, they show the code as follows:
var predicate = PredicateBuilder.True<employee>();
if (!string.IsNullOr...
Mohandas asked 7/11, 2012 at 0:47
4
With PredicateBuilder how do I get functionality similar to the SQL IN or NOT IN query?
For example I have a list of IDs and I want to select all of the People whose IDs either Match or do not mat...
Willumsen asked 23/8, 2011 at 5:17
1
Solved
C# in a Nutshell has a free class called PredicateBuilder which constructs LINQ predicates piece by piece available here. Here's an extract of the method which adds a new expression to the predicat...
Pottage asked 15/7, 2012 at 9:37
2
Solved
I needed to build a dynamic filter and I wanted to keep using entities. Because of this reason I wanted to use the PredicateBuilder from albahari.
I created the following code:
var invoerDatums = P...
Oteliaotero asked 1/6, 2010 at 6:59
1
Solved
I have been trying to refactor a LINQ expression into a method, and have been running into both the "Internal .NET Framework Data Provider error 1025." and "The parameter 'xyz' was not bound in the...
Hillel asked 21/5, 2012 at 17:9
2
Solved
I am using predicate builder to write the following code:
IEnumerable<int> ids= new List<int> { 47, 48 };
var predicate = PredicateBuilder.False<Customer>();
predicate = predic...
Pachisi asked 7/2, 2012 at 22:25
1
Solved
First off, this question is closely related to Graphical Predicate Builder in Xcode 4 With Core Data. However, I don't have a high enough rating to comment yet, and since I have no answer to offer,...
Cromagnon asked 24/7, 2011 at 19:26
3
Solved
Hi i want to create a list based on the search string using predicate expressions.
I have a list of type products contains different names.
List<products> list1 = new List<products>()...
Ironsmith asked 17/6, 2011 at 9:28
1
Solved
I am using Xcode 4, and I can't find a way to work with the graphical predicate builder. Is it still there? How do I use it? Where is the documentation on this?
Thanks
Indign asked 12/4, 2011 at 1:16
1
Solved
I have downloaded the predicate builder and am having a difficult time getting it to work with the entity framework. Here is my code: v_OrderDetail is the entity
var context = new OrdersEntities()...
Knighterrant asked 14/3, 2011 at 21:10
1
I would like to dynamically generate predicates that span multiple tables across a Join in a Linq statement. In the following code snippet, I want to use PredicateBuilder or a similar construct to ...
Amphioxus asked 14/3, 2011 at 19:13
1 Next >
© 2022 - 2024 — McMap. All rights reserved.