10 ms·
You can get away with providing your own classes and extension methods. I did that, my colleagues did that (floowing my attempt). We needed a LINQ access to a n
by thesz 13y ago
You can get away with providing your own classes and extension methods. I did that, my colleagues did that (floowing my attempt). We needed a LINQ access to a non-SQL (hypergraph) database, so basic LINQ wouldn't do it.
You need to know how to parse function bodies and I strongly suggest algebraic types approach, e.g., using SpecificType v = genericTypedVar as SpecificType and checking if v != null. You have to write your own parametrized type supporting Where, Select, etc.
And you're good to go.
It took me three days to write first LINQ-like thing.
- aashishkoirala 13y agoThat is true as well, especially if you need to support operations not part of out-of-the-box LINQ. The real meat there is in the Expressions API. The actual LINQ methods, if you look at them, don't do much except provide a way to delegate to the underlying IQueryProvider. That said, I think for stuff that is supported, better to stay within the "standard approach". But I get your point.