Is LINQ an ORM ?
I've heard a lot of people say LINQ follows the rules of an Object Relation Mapper. But I don't understand; is this true?
LINQ is a C#/VB.NET language syntax and a set of method signatures for querying data.
There are many providers for this syntax and some of them are ORMs. The simplest case is when you are querying collections in memory which is not an ORM. There are also ways to query XML, Active Directory and many others which are not ORMs using the same syntax and the same set of methods (implemented differently).
Practically every serious .NET ORM technology has some level of LINQ support
LINQ to SQL is the first ORM to support LINQ and it was kind of a proof of concept. It is easy to learn and lightweight but lacks a lot of features. It is still pretty decent and Stack Overflow used it (I'm not sure if they still use it). Entity Framework has LINQ to Entities provider and it is the heavy hitter from Microsoft. NHibernate has a LINQ provider that in my opinion barely works but they may fix it some day
There are more ORMs out there and most of them have some level of LINQ support.
Ok people, repeat after me:
LINQ is NOT about working with databases.
LINQ is an abstraction layer for working with data which allows for set based operations, projections, filters, etc on anything that can be enumerated over. It just happens to have providers for working with relational data (LINQ to SQL, LINQ to Datasets, LINQ to Entities).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With