3 ms·
I suspect you haven't yet seen tge power of LINQ, it's not the chaining that is its point - it's the lazy evaluation. It's not at all limited to DB operations.
by aliswe 6y ago
I suspect you haven't yet seen tge power of LINQ, it's not the chaining that is its point - it's the lazy evaluation. It's not at all limited to DB operations.
- FridgeSeal 6y agoEvery use of LINQ I've seen in .Net codebases has been to perform (more slowly) transformations or aggregations that should have done in the database.
- manigandham 6y agoSounds like you've worked with poor code/developers. LINQ with EF translates into DB queries including aggreations and transformations. That's the whole point of compiling the query, unless someone either didn't understand the query they were writing or explicitly chose client-side evaluation.
- aliswe 6y agoHello. LINQ isn't at all limited to LINQ-to-SQL. That is simply one of the numerous IQueryable providers, which is also possible to implement yourself by doing some expression parsing. And for the record I hate LINQ to SQL.
- pjmlp 6y agoFirst time I saw it was in Smalltalk-80 collections, .NET was yet to be invented: (#(1 2 3 4 5 6) select:[:e | x isPrime]) collect: [:e | 2 * e]