4 ms·
A line of LINQ looks and works nothing like a line of C#, and the difference is even worse in VB. Whether it's "part of the language" or not, it's a fundamental
by TheRealDunkirk 5y ago
A line of LINQ looks and works nothing like a line of C#, and the difference is even worse in VB. Whether it's "part of the language" or not, it's a fundamentally different way of writing logic than the base language you're writing around it. I agree it's completely coupled with EF, but I hate EF too. (After you've used ActiveRecord for over 10 years, any other ORM just feels like a ball and chain, but that's another topic.)
- benbristow 5y agoI came from a Rails background and it was definitely painful to learn EF since it has a lot of nuances and things you wouldn't know without experience (e.g. How things mutate throughout the object lifecycle, migration funkiness, how tracking works and 'AsNoTracking()' etc.) Think I'd still prefer ActiveRecord really but after you get used to EF (Core) it's still a good tool.
- yumaikas 5y ago> A line of LINQ looks and works nothing like a line of C# Maybe if you're using the query form, but if you're using the method form, I'd argue that they work together very nicely. For me, at least, I've found embracing Lambda expressions to be very helpful in a number of cases, between Linq, or writing my own code for doing things like rendering tables (long story there). Granted, I learned C# right after LINQ was released, but I'd still argue that LINQ is well worth having around.
- maleldil 5y agoAre you using the query syntax instead of the method syntax? Because the method syntax is completely in line with normal OO code (it's just a bunch of chained methods). I'll agree that the query syntax is weird, but I haven't seen it used much.