Expression Trees are an abstract representation of code in a tree structure where each node of the tree represents a programming construct (conditional, assignment, method call, etc.)
3
votes
1answer
111 views
Specification pattern in EF part 2
This is a follow on to Part 1
In order to use my new Specifications within expression trees so I can use them in projections/navigation collections I had to write ...
5
votes
2answers
99 views
Specification pattern in EF part 1
I've been experimenting with different ways of reusing (and naming) the expressions I use in Entity Framework. I've tried static fields with Expressions and ...
5
votes
1answer
79 views
LINQ Provider: Supporting Projections
Up until recently, my LINQ-to-Sage provider didn't support projections, so the client code had to explicitly "transfer" to LINQ-to-Objects, like this:
...
3
votes
1answer
81 views
Validation extensions
I've been working on another timesaver because I really really don't like to type all those validation ifs and exceptions over an over again.
What I came up with ...
4
votes
1answer
42 views
Binary expression tree node with two possible states
I am building out a binary expression tree and shown below is an implementation of the tree's node.
The node can be either a leaf or non-leaf, with leaves having ...
3
votes
2answers
161 views
Building expression tree with multiple OrElse
I am creating a way for users to filter results based on start and end values. An example of this would be:
...
8
votes
1answer
119 views
Linq-to-Sage Implementation
Following-up on my last question where I wrapped the Sage API with a familiar IRepository interface, I decided to push the abstraction a step further, and... ...
12
votes
2answers
168 views
Something like a LINQ provider
Ok, before you ask: yes, I need to do this. Sort of.
I'm wrapping a 3rd-party API for data access, and I can't use an ORM, so I'm implementing this kind of thing:
...
2
votes
0answers
91 views
Improved NullGuard v4 that supports property chains, methods and ignores value types
While working on my simple NullGuard recently I quickly came to the conclusion that this is not enough so I build a more advanced null checking.
Once again I ...
6
votes
1answer
107 views
NullGuard for throwing more informative exceptions
This small utility class is my solution for a more convenient way for checking against null. I also wanted to have more informative NullReferenceExceptions but I ...
-2
votes
1answer
209 views
8
votes
3answers
15k views
Generic advanced Delegate.CreateDelegate using expression trees
As far as I know the standard Delegate.CreateDelegate() which allows to create a delegate by using reflection, doesn't allow doing something as follows when the ...