11 ms·
So I'll admit I'm not at all familiar with LINQ and MSSQL, but from reading this, it looks like LINQ is just an ORM? And if that's the case, then of course it
by jedberg 10y ago
So I'll admit I'm not at all familiar with LINQ and MSSQL, but from reading this, it looks like LINQ is just an ORM?
And if that's the case, then of course it is easier and looks nicer than SQL -- that's kind of the point of an ORM.
But I could show you a whole bunch of articles about Python and Ruby and Go ORMs too.
Seems like an Apples to Oranges comparison.
- jordanlev 10y agoIt's not an ORM, more like an alternate way to write queries that's kind of embedded in the language itself (as opposed to SQL where you're putting together a string). If you're familiar with the Rails world, I'd say it's more like "Arel" than "ActiveRecord".
- jedberg 10y agoBut Linq literally generates SQL before sending it to the server: https://msdn.microsoft.com/en-us/library/system.data.linq.datacontext.getcommand.aspx https://msdn.microsoft.com/en-us/library/system.data.linq.da... Doesn't that make it an ORM?
- contextfree 10y agoThat link is about LINQ to SQL, not LINQ proper * LINQ is a set of language features and libraries that help enable better ORMs, among other things * LINQ to SQL and Entity Framework are examples of ORMs that use the LINQ features
- recursive 10y agoNo, because you can use linq without even having a server or even a database. ORMs are one application of linq, but it's a more general concept.
- ungzd 10y agoAs I understand, it's ORM, but without 'mapper'. Every ORM has querying DSL, some of them are not producing objects at all. I think LINQ is that part of ORM. Some ORMs have poor querying ability: Rails, Django (more OOP approach), but some have powerful: Sequel, Sqlalchemy (more data processing approach). For example, that's Sequel querying DSL: http://sequel.jeremyevans.net/rdoc/files/doc/querying_rdoc.html http://sequel.jeremyevans.net/rdoc/files/doc/querying_rdoc.h... And I think LINQ is "language integrated" because C#, like Java, has poor DSL building possibilities. So they're added ORM-specific syntax right into language.