Skip to main content

All Questions

Filter by
Sorted by
Tagged with
10 votes
4 answers
18k views

How to create an Expression builder in .NET

I have written some code to allow filtering of products on our website, and I am getting a pretty bad code smell. The user can select 1-* of these filters which means I need to be specific with the ...
aspirant_sensei's user avatar
4 votes
1 answer
258 views

Extending IQueryable with IsInDateTimeRange

So I am getting somewhat tired of rewriting the same queries over and over again. repo.Query().Where(stuff => stuff.Timestamp >= minTime && stuff.Timestamp <= maxTime && ...);...
jool's user avatar
  • 2,371
5 votes
2 answers
1k views

Queryable.Aggregate is not working with null values

I'm writing a visitor which transforms IQueryable query. It uses Aggregate method with seed null and then use some func to transform it. My problem is that this null is of type decimal?. But I get an ...
Alex Zhukovskiy's user avatar
7 votes
1 answer
232 views

How to make LINQ-to-Objects handle projections?

I have implemented a basic (naive?) LINQ provider that works ok for my purposes, but there's a number of quirks I'd like to address, but I'm not sure how. For example: // performing projection with ...
Mathieu Guindon's user avatar
2 votes
1 answer
5k views

Cross-Join Syntax in Entity Framework / IQueryable

I'm trying to deepen my education about IQueryable custom providers and expression trees. I'm interested in custom parsing a cross-join (viz. SelectMany), and I'm trying to understand if that is ...
Brent Arias's user avatar
  • 30.2k