Because every ORM sucks outside of the ones built on top of Linq.
Linq is great because it makes a query language a first class citizen and it decouples writing the query and the implementation.
Because every ORM sucks outside of the ones built on top of Linq.
Linq is great because it makes a query language a first class citizen and it decouples writing the query and the implementation.
Linq => expression trees => provider => native query language of data source => data source.
Written correctly, you can pass expressions around like:
repo.Find(c => c.age > 65 && c.gender == “male”)
And the expression can be interpreted at runtime by either EF creating native sql or the Mongo driver creating a native MongoQuery or even an in memory List for unit testing.
No matter how good another ORM may be for another language, what made C#s implementation better was Linq + expression trees.
There was also another Linq/ORM I used back in the day for Postgres. I can’t remember the name of it.