Re:Welcome to C# 9.0
by scarface74 on Wednesday May 20, 2020 @05:36PM
(#23252094)
And 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>>
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.