3 ms·
Why don't people understand that LINQ isn't just a C#-ish way to write SQL-like statements? So many people are comparing their libraries to LINQ without underst
by foepys 6y ago
Why don't people understand that LINQ isn't just a C#-ish way to write SQL-like statements? So many people are comparing their libraries to LINQ without understanding what it actually does.
LINQ brought System.Linq.Expressions and IQueryable to .NET which allows so much more than just filtering and grouping data. You can write entire data providers with LINQ and parse arbitrary expression trees in any way you like.
Entity Framework (Core) utilizes this very well. It doesn't just query an SQL database and then use LINQ's Where, Select etc. to manipulate the data but parses everything the developer has written to an expression tree and then generates an SQL statement at runtime.
- scarface74 6y agoAnd the Mongo Linq library is often. For $reasons I worked on an implementation that had to support Sql Server and Mongo. The models and the Linq expressions worked across both and were translated appropriately. We just passed around a bunch of Expression<Func<T>>